diff options
author | hasso <hasso> | 2004-09-15 16:21:59 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-09-15 16:21:59 +0000 |
commit | 53c997c90d7e20313bfb07d15d83b782d7a6530e (patch) | |
tree | 6f3299d7bd9a8d3be6914cc7a34acfc2ea2e9071 /isisd/isis_pdu.c | |
parent | bbc9ce2aa3985f3df242d2be49ebcc2bc6dd7f3a (diff) |
Second part of fixes from Laurent Rabret.
Diffstat (limited to 'isisd/isis_pdu.c')
-rw-r--r-- | isisd/isis_pdu.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 1ecdab48..cd685286 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -106,7 +106,7 @@ int ip_same_subnet (struct prefix_ipv4 *ip1, struct in_addr *ip2) { u_char *addr1, *addr2; - int shift, offset; + int shift, offset, offsetloop; int len; addr1 = (u_char *) & ip1->prefix.s_addr; @@ -114,23 +114,15 @@ ip_same_subnet (struct prefix_ipv4 *ip1, struct in_addr *ip2) len = ip1->prefixlen; shift = len % PNBBY; - offset = len / PNBBY; + offsetloop = offset = len / PNBBY; - while (offset--) - { - if (addr1[offset] != addr2[offset]) - { - return 0; - } - } + while (offsetloop--) + if (addr1[offsetloop] != addr2[offsetloop]) + return 0; if (shift) - { - if (maskbit[shift] & (addr1[offset] ^ addr2[offset])) - { - return 0; - } - } + if (maskbit[shift] & (addr1[offset] ^ addr2[offset])) + return 0; return 1; /* match */ } @@ -1414,6 +1406,13 @@ process_snp (int snp_type, int level, struct isis_circuit *circuit, return retval; } + /* FIXME: Authentication in LSPs does not mean authentication in SNPs... + * In fact by default IOS only deals with LSPs authentication!! + * To force authentication in SNPs, one must specify the 'authenticate + * snp' command after 'area-password WORD' or 'domain-password WORD'. + * This command is not supported for the moment. + */ +#if 0 (level == 1) ? (passwd = &circuit->area->area_passwd) : (passwd = &circuit->area->domain_passwd); if (passwd->type) @@ -1427,6 +1426,7 @@ process_snp (int snp_type, int level, struct isis_circuit *circuit, return ISIS_OK; } } +#endif /* 0 */ /* debug isis snp-packets */ if (isis->debugs & DEBUG_SNP_PACKETS) |