summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/interface.c
AgeCommit message (Collapse)Author
2011-07-04LINK_STATE_IS_UP() cleanup userland part. There is no need to specialClaudio Jeker
case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does the right job. OK deraadt@ henning@ This needs a -current kernel or link state may be not reported correctly.
2011-06-21Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudioMike Belopuhov
2011-05-09First bits to support opaque LSA. Type-9, 10 and 11 are LSA that canClaudio Jeker
hold about any data you like and is used for things like greaceful reload. Implement the basic redistribute logic and LSDB handling but the data sent is currently not looked at. Tested and OK sthen@
2011-05-06Do not special case loopback interfaces on init. Instead force themClaudio Jeker
to IF_STA_LOOPBACK in if_act_start() this way they will repsect IFF_UP on startup. Also remove a now no longer needed workaround when reloading interfaces. Initial diff provided by Patrick Coleman. OK dlg@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-05-14When merging interfaces after a config reload, the fsm state for interfacesStuart Henderson
is forced into IF_STA_NEW so that if_init() can be called to setup timers etc. When a loopback interface is added to the config, this means there's no way to get to the correct state. Fix by avoiding changing an existing IF_STA_LOOPBACK and forcing loopback interfaces to be passive (otherwise skipping the if_init on an active interface causes problems). ok claudio@
2010-02-16When taking an interface down just try to do the cleanup. In cases whereClaudio Jeker
the interface was removed or when the address changed leaving the multicast groups will fail because that already happend. Fix if_leave_group() to remove the refcount before doing the ioctl() so that the reference is correctly removed. OK dlg@, sthen@
2010-02-16implement support for fast hello packets.David Gwynne
if route-dead-time is set to "minimal" (rather than a number of seconds), the dead time is set to 1 second and hellos are sent at the interval specified by fast-hello-interval in msecs. this is non standard wrt to the ospf rfc, but it does interoperate with at least one other router vendor. this allows much better responsiveness to l3 topology changes than the standard intervals allow. if i yank a cable to one of my upstreams, the routes adjust in a second rather than the default of 40 i was running with before. the users dont even notice something changed. developed while working with joshua atterbury. ok claudio@ as part of a larger diff. dedicated to zan rowe who thinks she is a bigger nerd than me.
2009-09-30Oups, these changes should not have been commited. Revert.Claudio Jeker
2009-09-30Announce a stub network LSA for backup carp interfaces. This should helpClaudio Jeker
when fail-over happens, since removing the better route will not result in a blackhole until the update from the new master is processed. Tested, OK and input sthen@, phessler@
2009-08-09Scale both receive and send buffer on the raw socket. The default 8192Claudio Jeker
bytes is not enough for larger networks causing send errors because of too big packets. OK henning
2009-06-05Preliminary rdomain support, all hacked up by reyk@Claudio Jeker
2009-04-26comment typos; no binary changeStuart Henderson
2009-01-01Remove some other useless debug messages that just add unneeded noise.Claudio Jeker
2007-09-11Switch some more baudrates to 64 bit and initialize iface->baudrate.Claudio Jeker
2007-05-29Demote support for ospfd. It is possible to specify a demote group onClaudio Jeker
interfaces and areas. With this carp setups using ospfd are more reliable because we can fail over if the OSPF connectivity is (partially) lost. OK norby@
2007-02-01whitespace cleanup, no binary change.Claudio Jeker
2007-02-01If an interface is going down send out an empty OSPF hello packet so thatClaudio Jeker
all other routers will drop the session immediatly instead of waiting for the timeout that is normaly 40 sec. This reduces fail-over time massivly and does not hurt anymore since we are now able to reload the configuration on the fly. OK norby@ pyr@
2007-01-24When deleting a neighbor or a interface make sure that no events are pending.Claudio Jeker
Needed for reload support. OK norby@
2006-11-28add additional link states to report the half duplex / full duplexReyk Floeter
state, if known by the driver. this is required to check the full duplex state without depending on the ifmedia ioctl which can't be called in the kernel without process context. ok henning@, brad@
2006-11-17Support for multiple networks on one interface. Until now only the mainClaudio Jeker
address of a interface could be used. Now it is possible to specify a interface more than once if multiple networks are configured. An alternative network can be specified via e.g. interface em0:10.0.5.1. The old interface syntax without the IP still works and uses the main/first configured IP address. ospfd now needs to include the IP header on outgoing messages as it is not possible to specifiy the source address in sendto(2). Additionally all multicast joins and leaves have to be tracked. OK norby@
2006-09-27Use IP_RECVIF to get the incomming interface of OSPF packets. Now we useClaudio Jeker
the source address and the interface index to find the corresponding struct interface which is less error prone. OK norby@
2006-08-18Correctly leave the all AllDRouters group (224.0.0.6) if the interface wasClaudio Jeker
in state DR or BACKUP. Found while analizing PR5192 with norby@ -- seems to help but there is still a issue left. OK norby@
2006-04-24Fix parser to match current behaviour and make auth-type et al. part of theClaudio Jeker
global and per area defaults. With this it is now possible to define one set of auth-md keys and use them in every defined interface. OK norby@
2006-04-16KNFHenning Brauer
2006-03-23List interfaces they way we list neighbors etc.Esben Norby
This makes it much easier to grep in the output. The original format of "show interface" can be seen with "show interface detail". help and ok claudio@
2006-03-15Looks like auth-type simple was busted since a long time. We bcmp() aClaudio Jeker
c string with a lenght <= 8 with a buffer of size 8. Now in some cases there can be trailing garbage after the c-string and so the bcmp() fails. Found by Sergey Matveychuk who provided a similar patch. OK norby@
2006-03-13The return value of the start/stop timer functions is almost never checked.Claudio Jeker
Switch them to void functions and check if evtimer_add/del fails -- in which case we fatal() as there is no useful way to recover in such an event. OK norby@
2006-03-09Track interface uptime.Esben Norby
ok claudio@
2006-03-09Move *_name functions to log.c and use these for both ospfd and ospfctl.Claudio Jeker
Stuff that is only used in ospfd debug messages is simplified. OK norby@
2006-03-09KNF, remove some unneded type casts and add some ARGSUSED. This makes lintClaudio Jeker
almost happy.
2006-03-09if_event_names is only used by interface.c so move it there.Claudio Jeker
2006-03-08Spaces and other minor cleanup.Claudio Jeker
2006-01-05Make ospfd respect carp(4) interfaces and their weird behaviour. They willClaudio Jeker
not be used to connect to a OSPF cloud and forced to be passive. With this ospfd will only announce the carp interface route if the interface is master. So you can connect a LAN in a redundant way to your ospf backbone. OK norby@
2005-12-15Simpify iface_del() and nbr_del(). make them void funtions as they can not failClaudio Jeker
and do not remove a element twice in iface_del(). OK norby@
2005-12-04Increase the receive buffer of the raw socket.Esben Norby
Prevents some of the retransmitting during bulk ls update transfers. ok claudio@
2005-10-19fix some spellings in comments.Claudio Jeker
2005-10-18Cleanup interface code a minimal bit. There is no need for if_shutdown(),Claudio Jeker
especially it got called in the wrong place. OK norby@
2005-10-12If router is DR or BDR join the AllDRouter list (and leave it if otherwise).Claudio Jeker
OK norby@
2005-09-28- use proper function name in log messageMathieu Sauve-Frankel
ok norby@
2005-09-24- add auth_type and auth_keyid to struct ctl_ifaceMathieu Sauve-Frankel
- have ospfctl tell us when we are using authentication with 'show interface' ok claudio@ norby@
2005-09-17- add get_rtr_id() based on bgpd's get_bgpid()Mathieu Sauve-Frankel
- remove rtr_id from struct iface we don't need to keep a copy of this value per interface - replace all references to iface->rtr_id.s_addr with calls to ospfe_rtr_id() ok claudio@ norby@
2005-09-15Correctly handle loopback interfaces. Mark them as point-to-point networksClaudio Jeker
that are in loopback mode. With this it is possible to use lo1 to hold the loopback address of the router as done often on ciscos etc. Problem found and fix tested by jakob@ OK norby@
2005-08-30Fix one of the most fragile part of ospfd -- the interface election code.Claudio Jeker
One of the main problems is that the RFC is very unprecise about the process and so a bit of guessing and "violating" the RFC is needed. The problem was that on fast restarts ospfd computed wrong DR and BDR routers. OK norby@ deraadt@
2005-06-21Backout/Disable the change introduced in rev. 1.26. Don't start the helloClaudio Jeker
timer in IF_STA_WAITING. We are not ready for this because the RFC is totaly fucked up in that specific area causing many issues on fast reloads. OK norby@
2005-06-13One additional if_act_elect bug. Neighbors in preliminary state (down, attemptClaudio Jeker
and init) are not electable not only neighbors that are in state down. OK norby@
2005-06-13Doh. Fix another stupid copy paste typo. Once again BDR != DR.Claudio Jeker
OK norby@
2005-06-13add a new fsm transition for IF_EVT_WTIMER in state IF_STA_ANY that simplyClaudio Jeker
ignores the event. This removes the warning "fsm_if: interface em0, event WAITTIMER not expected in state DROTHER" in case of a quick startup. OK norby@
2005-06-13start hello timer even if in state IF_STA_WAITING (this makes the startup muchClaudio Jeker
faster and follows the RFC more closely). OK norby@
2005-05-27Virtual link support.Esben Norby
ok claudio@