summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_packet.c
Commit message (Collapse)AuthorAgeFilesLines
* ospfd: Remove HAVE_OPAQUE_LSADonald Sharp2016-02-261-24/+0
| | | | | | | | HAVE_OPAQUE_LSA is used by default and you have to actively turn it off except that OPAQUE_LSA is an industry standard and used pretty much everywhere. There is no need to have special #defines for this anymore. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-02-261-1/+1
|
* ospfd: fix unused warning in ospf_writeDavid Lamparter2015-10-161-2/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Fast OSPF convergenceMichael Rossberg2015-09-241-3/+3
| | | | | | | | | | | | When considering small networks that have extreme requirements on availability and thus convergence delay, the timers given in the OSPF RFC seem a little “conservative”, i.e., the delay between accepted LSAs and the rate at which LSAs are sent. Cisco introduced two commands 'timers throttle lsa all’ and 'timers lsa arrival’, which allow operators to tune these parameters. I have been writing a patch to also support 'timers lsa arrival’ fully and ‘timers throttle lsa all’ (without the throttling part) also in quagga.
* ospfd: ospf_ls_upd_send() add missing unlock.Joakim Tjernlund2015-07-291-0/+2
| | | | | Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Feng Lu <lu.feng@6wind.com>
* ospfd: Remove another odd flooding hack in opaque LSA codePaul Jakma2015-05-141-15/+0
| | | | | | | | | | | | | * ospf_opaque.c: (ospf_opaque_adjust_lsreq) Odd hack to general OSPF database exchange but made to act only on opaque LSAs. It's either covering up bugs in the flooding code or its wrong. If it's covering up bugs, those would affect all LSAs and should be fixed at a lower layer in ospfd, indeed perhaps those bugs are long fixed anyway (?). Alternatively, it's just plain wrong. Nuke. (ospf_opaque_exclude_lsa_from_lsreq) helper to above, nuke. * ospf_packet.c: Nuke call to ospf_opaque_adjust_lsreq. Tested-by: olivier.dugeon@orange.com
* ospfd: Remove the blocking of opaque LSAs origination & flooding 'optimisation'Paul Jakma2015-05-051-8/+1
| | | | | | | | | | | | | * Opaque support contains some kind of hack/optimisation to origination/flooding to suppress some origins/floods until an opaque LS Acks are received. Previous versions of the code have already been shown to have bugs in them (see e16fd8a5, e.g.). It seems over-complex and fragile, plus its conceptually the wrong place to try implement flooding hacks that, AFAICT, do not depend particularly on the semantics of opaque LSA. Nuke. Tested-by: Olivier Dugeon <olivier.dugeon@orange.com>
* *: use void * for printing pointersDavid Lamparter2015-04-211-3/+4
| | | | | | | | | On higher warning levels, compilers expect %p printf arguments to be void *. Since format string / argument warnings can be useful otherwise, let's get rid of this noise by sprinkling casts to void * over printf calls. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: set O-bit in the option of all DD packetsLu Feng2015-02-061-16/+1
| | | | | | | | | | If opaque-capability is enabled, we must set the O-bit in the option field of all DD packets. Changing the option field of DD packets may cause the peer to reset the state back to ExStart. Signed-off-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Tweak previous iface RR write patch to avoid free/malloc & redundant logPaul Jakma2014-11-111-10/+2
| | | | | | | | | * linklist.{c,h}: (listnode_move_to_tail) new unction to move a listnode to tail of list. * ospf_packet.c: (ospf_write) remove debug that seemed to be mostly covered by existing debug. Use listnode_move_to_tail to just move the list node to the end of the tail, rather than freeing the one to hand and allocing a new one.
* Avoid timing out of adjacencies by serving all interfaces in round-robin.Dinesh G Dutt2014-11-111-3/+15
| | | | | | | | | | | Ensure that all interfaces are served in a round robin fashion during write. This prevents adjacencies from timing out when you have a lot of LSAs to be sent out each adjacency. This is essentially a scalability improvement. Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
* ospfd: invalid MD5 auth_key?Joakim Tjernlund2014-10-271-2/+2
| | | | | | | | | | | | | | | This looks fishy in ospf_make_md5_digest() if (list_isempty (OSPF_IF_PARAM (oi, auth_crypt))) auth_key = (const u_int8_t *) ""; ... MD5Update(&ctx, auth_key, OSPF_AUTH_MD5_SIZE); auth_key points to a "" string of len 1 which is a lot smaller that OSPF_AUTH_MD5_SIZE. Is this intentional to get some random data or just a plain bug? Anyone using MD5 should have a closer look and decide what to do. Acked-by: Feng Lu <lu.feng@6wind.com>
* *: nuke ^L (page feed)David Lamparter2014-06-041-3/+3
| | | | | | | | | | | | | | Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: check the LS-Ack's recentness instead of only comparing the #seqLu Feng2014-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISSUE: RTA(DR)-----(BackupDR)RTB RTA advertises a new LSA to RTB, and then flushes the LSA (with setting the age of the LSA to MaxAge) within 1 second. Then the LSA is deleted from RTA, while it still exists on RTB with non-MaxAge and can not be flushed any more. FIX: The reason can be explained in below: a) RTA -- new LSA, #seq=1 --> RTB (RTB will send the delayed Ack in 1s) b) RTA -- MaxAge LSA, #seq=1 --> RTB (RTB discards it for the MIN_LS_ARRIVAL) c) RTA <-- Ack for the new LSA, #seq=1 -- RTB (RTA accepts it) In the step c), ospf_ls_ack() compares the #seq of the entry in the LS-Ack with that of local MaxAge LSA. The #seq of the two entries are same. So the Ack is accepted and the LSA is removed from the retransmit-list (while it should not). In RFC2328, section 13.7. Receiving link state acknowledgments: o If the acknowledgment is for the same instance that is <== contained on the list, remove the item from the list and examine the next acknowledgment. Otherwise: where "same instance" does not mean the same #seq. We must call ospf_lsa_more_recent() to check whether the two instances are same. Signed-off-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: protect vs. VU#229804 (malformed Router-LSA)David Lamparter2013-08-061-0/+21
| | | | | | | | | | | | | | | | | | | | | | VU#229804 reports that, by injecting Router LSAs with the Advertising Router ID different from the Link State ID, OSPF implementations can be tricked into retaining and using invalid information. Quagga is not vulnerable to this because it looks up Router LSAs by (Router-ID, LS-ID) pair. The relevant code is in ospf_lsa.c l.3140. Note the double "id" parameter at the end. Still, we can provide an improvement here by discarding such malformed LSAs and providing a warning to the administrator. While we cannot prevent such malformed LSAs from entering the OSPF domain, we can certainly try to limit their distribution. cf. http://www.kb.cert.org/vuls/id/229804 for the vulnerability report. This issue is a specification issue in the OSPF protocol that was discovered by Dr. Gabi Nakibly. Reported-by: CERT Coordination Center <cert@cert.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: fix flooding procedureChristian Franke2013-04-201-2/+1
| | | | | | | | | | | An ospf router should accept a new maxage LSA into its lsdb if it has any neighbors in state Exchange or Loading. ospfd would however only account for neighbors on the same interface which does not seem to be a valid optimization. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Joachim Nilsson <troglobit@gmail.com> Signed-off-by: David Lamparter <equinox@diac24.net>
* ospfd: fix LSA initialization for build without opaque LSAChristian Franke2013-04-091-0/+2
| | | | | | | | If configured without opaque LSA support, the old code would incorrectly associate type 5 LSAs with an area. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: compile warning cleanupsAndrew Certain2013-01-071-1/+1
| | | | | | | | | | | | | | A set of patches to clarify some comments as well as cleanup code that was causing warnings. After these patches, the code can be compiled with -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual -Wextra -Wno-unused-parameter -Wno-missing-field-initializers (what is current in trunk plus -Wextra -Wno-unused-parameter -Wno-missing-field-initializers). Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
* ospfd: Update comments to be more clear in packet processingAndrew Certain2013-01-071-10/+16
| | | | Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
* ospf: Reduce MaxAge log levelAyan Banerjee2013-01-071-2/+5
| | | | | | | | | | Reduce the log level for the MaxAge LSA reception when such an LSA does not exist in the database. Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
* lib: improve fletcher checksum validationJR Rivers2012-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OVERVIEW The checksum used in OSPF (rfc2328) is specified in rc905 annex B. There is an sample implementation in rfc1008 which forms the basis of the quagga implementation. This algorithm works perfectly when generating a checksum; however, validation is a bit problematic. The following LSA (generated by a non-quagga implementation) is received by quagga and marked with an invalid checksum; however, it passes both the rfc905 and rfc1008 validation checks. static uint8_t lsa_10_121_233_29[] = { 0x0e, 0x10, 0x02, 0x03, 0x09, 0x00, 0x35, 0x40, 0x0a, 0x79, 0xe9, 0x1d, 0x80, 0x00, 0x00, 0x03, 0x00, 0x8a, 0x00, 0x1c, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x36, 0xb0 }; LS Type: Summary-LSA (IP network) LS Age: 3600 seconds Do Not Age: False Options: 0x02 (E) Link-State Advertisement Type: Summary-LSA (IP network) (3) Link State ID: 9.0.53.64 Advertising Router: 10.121.233.29 (10.121.233.29) LS Sequence Number: 0x80000003 LS Checksum: 0x008a Length: 28 Netmask: 255.255.255.224 Metric: 14000 You'll note that one byte of the checksum is 0x00; quagga would calculate the checksum as 0xff8a. It can be argued that the sourcing implementation generates an incorrect checksum; however, rfc905 indicates that, for 1's complement arithmetic, the value 255 shall be regarded as 0, thus either values are valid. EXPLANATION The quagga ospfd and ospf6d implementations operate by copying the PDU's existing checksum in a holding variable, calculating the checksum, and comparing the resulting checksum to the original. As a note, this implementation has the side effect of modifying the contents of the PDU. Evaluation of both rfc905 and rfc1008 shows that checksum validation should involve calculating the sum over the PDU and checking that both resulting C0 and C1 values are zero. This behavior is enacted in the rfc1008 implementation by calling encodecc with k = 0 (checksum offset); however, this functionality had been omitted from the quagga implementation. PATCH This patch adds the ability to call the quagga's fletcher_checksum() with a checksum offset value of 0xffff (aka FLETCHER_CHECKSUM_VALIDATE) which returns the sum over the buffer (a value of 0 indicates a valid checksum). This is similar to the mechanism in rfc1008 when called with k = 0. The patch also introduces ospf_lsa_checksum_valid(). ospf6d had it's own implementation of the fletcher checksum in ospf6_lsa_checksum(); it's the same algorithm as in fletcher_checksum(). This patch removes the local implementation in favor of the library's as well as creates and uses ospf6_lsa_checksum_valid(). quagga's ISIS implementation suffers from the same problem; however, I do not have the facilities to validate a fix to ISIS, thus this change has been left to the ISIS maintainers. The function iso_csum_verify() should be reduced to running the fletcher checksum over the buffer using an offset of 0. Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com> Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: reduce ospf_verify_header()Denis Ovsienko2012-03-121-15/+6
| | | | | Protocol version checks fits ospf_packet_examin() better (like it is implemented in ospf6d), and packet type check is already there.
* ospfd: bring ospf_check_auth() into focusDenis Ovsienko2012-03-121-70/+100
| | | | | | | | | | | | | | | | | | The old ospf_check_auth() function did two different jobs depending on AuType. For Null and Simple cases it actually authenticated the packet, but for Cryptographic case it only checked declared packet size (not taking the actual number of bytes on wire into account). The calling function, ospf_verify_header(), had its own set of MD5/checksum checks dispatched depending on AuType. This commit makes the packet size check work against the real number of bytes and moves it to ospf_packet_examine(). All MD5/checksum verification is now performed in ospf_check_auth() function. * ospf_packet.c * ospf_packet_examin(): check length with MD5 bytes in mind * ospf_verify_header(): remove all AuType-specific code * ospf_check_auth(): completely rewrite
* ospfd: fix packet length check for auth/LLS casesDenis Ovsienko2012-03-121-5/+5
| | | | | | | | | | An OSPFv2 packet with trailing data blocks (authentication and/or link-local signaling) failed the recently implemented packet length check, because trailing data length isn't counted in the packet header "length" field. This commit fixes respective check conditions. * ospf_packet.c * ospf_packet_examin(): use "bytesdeclared" instead of "bytesonwire"
* ospfd: introduce ospf_lsa_minlen[] (BZ#705)Denis Ovsienko2012-03-121-1/+259
| | | | | | | | | | | | | | | This commit ports more packet checks to OSPFv2, in particular, LSA size verification and Router-LSA link blocks verification. * ospf_lsa.h: add LSA size macros * ospf_packet.h: add struct ospf_ls_update * ospf_packet.c * ospf_lsa_minlen[]: a direct equivalent of ospf6_lsa_minlen[] * ospf_router_lsa_links_examin(): new function, verifies trailing part of a Router-LSA * ospf_lsa_examin(): new function like ospf6_lsa_examin() * ospf_lsaseq_examin(): new function like ospf6_lsaseq_examin() * ospf_packet_examin(): add type-specific deeper level checks
* ospfd: review ospf_check_md5_digest()Denis Ovsienko2012-03-121-15/+5
| | | | | Rewrite some pointer arithmetics without the additional variables and move byte order conversion inside the function.
* ospfd: review ospf_check_auth()Denis Ovsienko2012-03-121-4/+3
| | | | | | | | | 1. The only purpose of "ibuf" argument was to get stream size, which was always equal to OSPF_MAX_PACKET_SIZE + 1, exactly as initialized in ospf_new(). 2. Fix the packet size check condition, which was incorrect for very large packets, at least in theory.
* ospfd: introduce ospf_packet_minlen[] (BZ#705)Denis Ovsienko2012-03-121-9/+56
| | | | | | | | | | | | This commit ports some of the OSPFv3 packet reception checks to OSPFv2. * ospf_packet.c * ospf_packet_minlen[]: a direct equivalent of ospf6_packet_minlen[] * ospf_packet_examin(): new function designed after the first part of ospf6_packet_examin() * ospf_read(): verify received packet with ospf_packet_examin() * ospf_packet.h: add convenience macros
* ospfd: fix ospf_packet_add_top() to use LOOKUP()Denis Ovsienko2012-03-121-1/+1
|
* ospfd: use LOOKUP() for ospf_packet_type_strDenis Ovsienko2012-03-121-12/+13
| | | | | | | | | | | | | | * ospf_packet.h: add proper str/max extern declarations * ospf_packet.c * ospf_packet_type_str: rewrite in "struct message", add max value * ospf_packet_add(): use LOOKUP() * ospf_write(): ditto * ospf_hello(): ditto * ospf_read(): ditto * ospf_dump.h: the declaration does not belong here * ospf_dump.c * ospf_header_dump(): use LOOKUP() * show_debugging_ospf(): ditto
* general: remove inline qualifiers and move in-header functions to objectsPaul Jakma2012-01-061-2/+2
| | | | | | * (general) Move functions in headers into files, to be compiled into shared object files. Remove inline qualifier from functions. Let the compiler do the work.
* ospfd: fix packet reception for FreeBSD 10.Dmitrij Tejblum2012-01-021-1/+1
| | | | | | | | * ospf_packet.c (ospf_recv_packet): FreeBSD, starting from version 10, will not subtract the IP header size from ip_len. This is the patch from FreeBSD's ports/net/quagga/files/patch-ospfd__ospf_packet.c, by Boris Kovalenko.
* ospfd: more info in LSA checksum warning (BZ#685)Jaroslav Fojtik2011-12-211-2/+7
|
* ospfd: fix regression in recent commitYAMAMOTO Shigeru2011-09-291-10/+15
| | | | | | | | | commit '717750433839762d23a5f8d88fe0b4d57c8d490a' causes SEGV error, when 'oi = ospf_if_lookup_recv_if (ospf, iph->ip_src, ifp);' returns NULL. * ospf_packet.c * ospf_read(): change a place of calling 'ospf_verify_header()'
* ospfd: CVE-2011-3325 part 2 (OSPF pkt type segv)Denis Ovsienko2011-09-261-14/+18
| | | | | | | | | | | | | This vulnerability (CERT-FI #514838) was reported by CROSS project. The error is reproducible only when ospfd debugging is enabled: * debug ospf packet all * debug ospf zebra When incoming packet header type field is set to 0x0a, ospfd will crash. * ospf_packet.c * ospf_verify_header(): add type field check * ospf_read(): perform input checks early
* ospfd: CVE-2011-3325 part 1 (OSPF header underrun)Denis Ovsienko2011-09-261-3/+12
| | | | | | | | | This vulnerability (CERT-FI #514838) was reported by CROSS project. When only 14 first bytes of a Hello packet is delivered, ospfd crashes. * ospf_packet.c * ospf_read(): add size check
* Merge remote-tracking branch 'polymorf/master'Greg Troxel2011-07-131-0/+16
|\
| * Fix ip_len byte order in DragonFly's raw socketDavid BÉRARD2010-05-111-0/+16
| |
* | ospfd: Prioritise hellos for sending by queueing to head of output bufferPaul Jakma2010-12-081-46/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * It's possible for the packet output buffer to be filled up with a long series of non-Hello packets in between Hellos packets, such that the router's neighbours don't receive the Hello packet in time, even though the hello-timer ran at about the right time. Fix this by prioritising Hello packets, letting them skip the queue and go ahead of any packets already on the queue. This problem can occur when there are lots of LSAs and slow links. * ospf_packet.h: (ospf_hello_send_sub) not used outside of ospf_packet.c * ospf_packet.c: (ospf_fifo_push_head) add packet to head of fifo (so its no longer really a fifo, but hey) (ospf_packet_add_top) add packet to top of the packet output queue. (ospf_hello_send_sub) Put Hello's at the top of the packet output queue. make it take in_addr_t parameter, so that this ospf_hello_send can re-use this code too. (ospf_hello_send) consolidate code by using ospf_hello_send_sub (ospf_poll_send,ospf_hello_reply_timer) adjust for ospf_hello_send_sub.
* | ospfd: Reset neighbour inactivity timer for any packet arrivalPaul Jakma2010-12-081-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The hello protocol monitors connectivity in 2 different ways: a) local -> remote b) remote -> local Connectivity is required in both directions (2-way) for adjacencies to form. The first requires a round-trip to detect, and is done by advertising which other hosts a router knows about in its hello messages. This allows a host to detect which other routers are and are not receiving its message. If a remote neighbour delists the local router, then the local router raises a "1-Way Received" event. The latter is straight-forward, and is detected by setting a timer for the neighbour. If another Hello packet is not received within this time then the neighbour is dead, and a separate "Inactive" event is raised. These are 2 different and relatively independent measures. Knowing that we can optimise the 2nd, remote->local measure and reset the timer when /any/ packet arrives from that neighbour. For any packet is as good as a Hello packet. This can help in marginal situations, where the number of protocol messages that must be sent sometimes can exceed the capacity of the network to transmit the messages within the configured dead-time. I.e. an OSPF network with lots of LSAs, slow links and/or slow hosts (e.g. O(10k) LSAs, O(100kbit) links, embedded CPUs, and O(10s) dead-times). This optimisation allows an OSPF network to run closer to this margin, and/or allows networks to perhaps better cope with rare periods of exceptional load, where otherwise they would not. It's fully compatible with plain OSPF implementations and doesn't prejudice dead-neighbour detection. * ospf_nsm.h: Rename HelloReceived event to PacketReceived. * ospf_nsm.c: (nsm_hello_received) -> nsm_packet_received * ospf_packet.c: Schedule PacketReceived whenever a valid message is received.
* | ospfd: OSPF_MIN_LS_ARRIVAL compare should be >= to match ospf_floodPaul Jakma2010-12-081-1/+1
|/ | | | | | | * ospf_packet.c: (ospf_ls_upd) the corresponding test on the arrival side in (ospf_flood) is <, so this should be >=, not >, purely for consistency. There is no practical effect here though.
* ospfd: Fix debug messages that were masked by DISCARD_LSAPaul Jakma2010-01-141-3/+4
| | | | | * ospf_packet.c: (ospf_ls_upd) DISCARD_LSA continues, and so should be after debug messages, not before them.
* ospfd: Make "Packet ... received on wrong link" conditional on debugPaul Jakma2009-08-111-2/+3
| | | | | | * ospf_packet.c: make this message conditional on 'debug ospf event', as it be easily triggered with, e.g., multiple subnets sharing same physical network. E.g, see bug #532.
* ospfd: Make ospf_if_lookup_recv_if() find the right unnumbered i/fJoakim Tjernlund2009-07-281-2/+2
| | | | | | | | | | | | | | | This function will return the interface for the first matching remote address for PtP i/f's. That won't work for multiple unnumbered i/f's as these may all have the same address. Pass in the struct interface pointer, ifp, to find the correct set of oi's to search in. This also reduces the size of the search list, making it faster. * ospfd/ospf_interface.c: Add struct interface * param to ospf_if_lookup_recv_if() to select the right list to search in. * ospfd/ospf_interface.h: ditto. * ospfd/ospf_packet.c: Pass new ifp argument to ospf_if_lookup_recv_if()
* [ospfd] discount IP header size from a new LSA pktDmitry Tejblum2009-06-241-3/+12
|
* [ospfd] Move passive interface checkJoakim Tjernlund2008-09-241-18/+26
| | | | | | | * ospf_packet.c: Apply passive check and drop for all packages and not just Hellos. Signed-off-by: Paul Jakma <paul@quagga.net>
* Set destination for PtP links to OSPF_ALLSPFROUTERS.Joakim Tjernlund2008-08-251-6/+14
| | | | | | | | | | | | | | | | | | | Update ospf_db_desc_send(), ospf_ls_upd_queue_send() and ospf_ls_req_send() to always use OSPF_ALLSPFROUTERS for PtP links. See RFC 2328, chap 8.1 for details: "The IP destination address for the packet is selected as follows. On physical point-to-point networks, the IP destination is always set to the address AllSPFRouters." Without this, it won't be possible to establish adjacencies on multiple unnumbered links to the same router. ChangeLog: 2008-07-25 Joakim Tjernlund <Joakim.Tjernlund@transmode.se> * ospfd/ospf_packet.c: Set destination for PtP links to OSPF_ALLSPFROUTERS.
* Bug #362 is fixed now.Denis Ovsienko2007-08-211-2/+6
|
* [autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warningsPaul Jakma2007-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2007-05-09 Paul Jakma <paul.jakma@sun.com> * configure.ac: sys/conf.h depends on sys/param.h, at least on FBSD 6.2. (bug #363) Should check for in_pktinfo for IRDP 2006-05-27 Paul Jakma <paul.jakma@sun.com> * configure.ac: General cleanup of header and type checks, introducing an internal define, QUAGGA_INCLUDES, to build up a list of stuff to include so as to avoid 'present but cant be compiled' warnings. Misc additional checks of things missing according to autoscan. Add LIBM, for bgpd's use of libm, so as to avoid burdening LIBS, and all the binaries, with libm linkage. Remove the bad practice of using m4 changequote(), just quote the []'s in the case statements properly. This should fix bugs 162, 303 and 178. * */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN, * bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().
* [ospfd] Add passive-interface default supportPaul Jakma2006-10-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-10-22 Yar Tikhiy <yar@comp.chem.msu.su> * (general) Add support for passive-interface default (with minor edits by Paul Jakma). * ospf_interface.h: Add OSPF_IF_PASSIVE_STATUS macro, looking at configured value, or the global 'default' value, as required. * ospf_interface.c: (ospf_if_new_hook) Leave passive unconfigured per default, allowing global 'default' to take effect for unconfigured interfaces. * ospf_packet.c: (various) use OSPF_IF_PASSIVE_STATUS * ospf_vty.c: (ospf_passive_interface_default) new function, unset passive from all interfaces if default is enabled, as the per-iface settings become redundant. (ospf_passive_interface_update) new func, update passive setting taking global default into account. ({no,}ospf_passive_interface_addr_cmd) Add support for 'default' variant of command. (show_ip_ospf_interface_sub) Update to take global default into account when printing passive status. (ospf_config_write) ditto. * ospfd.c: (ospf_new) set global passive-interface default. * ospfd.h: (struct ospf) Add field for global passive-interface.