• Patch: Elm ME+ 2.5 PLalpha54 -> Elm ME+ 2.5 PLalpha60 [7/13] (2/4)

    From Kari Hurtta@21:1/5 to All on Thu Nov 24 20:28:18 2022
    [continued from previous message]

    + void merge1_entries(target,value)
    + struct service_entry *target;
    + struct service_entry *value;
    + {
    + if (SERVICE_ENTRY_magic != target->magic)
    + panic("CONNECTION PANIC",__FILE__,__LINE__,
    + "merge1_entries",
    + "Bad magic (service_entry) (target)",0);
    + if (SERVICE_ENTRY_magic != value->magic)
    + panic("CONNECTION PANIC",__FILE__,__LINE__,
    + "merge1_entries",
    + "Bad magic (service_entry) (value)",0);
    +
    + if (target->ip_literal_addrsize != value->ip_literal_addrsize) {
    + DPRINT(Debug,10,(&Debug,
    + "... literal ip address size differ. Merge ignored\n"));
    + return;
    + }
    +
    + if (target->ip_literal_address.dummy &&
    + value->ip_literal_address.dummy &&
    + target->ip_literal_addrsize) {
    +
    + if (0 != memcmp(target->ip_literal_address.dummy,
    + value->ip_literal_address.dummy,
    + target->ip_literal_addrsize)) {
    +
    + DPRINT(Debug,10,(&Debug,
    + "... literal ip address differ. Merge ignored\n"));
    + return;
    + }
    +
    + } else if (target->ip_literal_address.dummy ||
    + value->ip_literal_address.dummy) {
    +
    + DPRINT(Debug,10,(&Debug,
    + "... literal ip address differ. Merge ignored\n"));
    + return;
    + }
    +
    + if (target->service == &(SERVICE_TYPES[0])) {
    + target->service = value->service;
    + if (target->service != &(SERVICE_TYPES[0])) {
    + DPRINT(Debug,10,(&Debug, "... setting temporary entry for %s to be type %s\n",
    + target->official_name,
    + target->service->name));
    + }
    + } else if (target->service != value->service &&
    + value->service != &(SERVICE_TYPES[0])) {
    + DPRINT(Debug,1,(&Debug,
    + "... conflicting service entry types. Type %s used, %s ignored\n",
    + target->service->name,
    + value->service->name
    + ));
    + return;
    + }
    +
    + copy_service_data(target,value);
    + }
    +
    static void merge_entries P_((struct service_entry **ret,
    struct service_entry *value));
    static void merge_entries(ret,value)
    ***************
    *** 1696,1702 ****
    }
    }

    ! if (entry->flags & SE_given_port) {
    int y;
    for (y = 0; y < entry->port_count; y++) {
    elm_fprintf(f,FRM("%sport=%d"),
    --- 2162,2168 ----
    }
    }

    ! if (ison(entry->flags,SE_given_port)) {
    int y;
    for (y = 0; y < entry->port_count; y++) {
    elm_fprintf(f,FRM("%sport=%d"),
    ***************
    *** 1705,1723 ****
    }
    }

    ! if (entry->flags & SE_ver_tls_cert) {
    elm_fprintf(f,FRM("%sverify-tls-certificate"),
    sep);
    sep = "; ";
    }

    ! if (entry->flags & SE_nover_tls_cert) {
    elm_fprintf(f,FRM("%sverify-tls-certificate=OFF"),
    sep);
    sep = "; ";
    }

    ! if (entry->flags & SE_require_tls_name) {
    elm_fprintf(f,FRM("%srequire-tls-peer-name"),
    sep);
    sep = "; ";
    --- 2171,2195 ----
    }
    }

    ! if (ison(entry->flags,SE_ver_tls_cert)) {
    elm_fprintf(f,FRM("%sverify-tls-certificate"),
    sep);
    sep = "; ";
    }

    ! if (ison(entry->flags,SE_nover_tls_cert)) {
    elm_fprintf(f,FRM("%sverify-tls-certificate=OFF"),
    sep);
    sep = "; ";
    }

    ! if (ison(entry->flags,SE_nouse_tls_checks))