OpenBSD CVS

CVS log for src/usr.sbin/ospfd/interface.c


[BACK] Up to [local] / src / usr.sbin / ospfd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.87 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:14 2023 UTC (14 months, 3 weeks ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.86: +1 -3 lines
Diff to previous 1.86 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.86 / (download) - annotate - [select for diffs], Sat Jan 16 08:03:55 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.85: +8 -2 lines
Diff to previous 1.85 (colored)

Use struct ip_mreqn for the IP_MULTICAST_IF setsockopt. This way
ospfd will pick the right interface to send out hello packets.
Clear the struct ip_mreqn in all cases because not all fields are
used.
OK bluhm@ phessler@

Revision 1.85 / (download) - annotate - [select for diffs], Tue Jan 12 09:11:09 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.84: +5 -5 lines
Diff to previous 1.84 (colored)

Use the interface index of struct ip_mreqn in IP_ADD_MEMBERSHIP to send
out packets. This way ospfd can work on interfaces that share the same IP.
OK dlg@

Revision 1.84 / (download) - annotate - [select for diffs], Mon Nov 2 00:30:56 2020 UTC (3 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.83: +4 -1 lines
Diff to previous 1.83 (colored)

print "depend on" information when available in "ospfctl sh int" output.

ok remi@

Revision 1.83 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:49 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.82: +7 -7 lines
Diff to previous 1.82 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Mar 11 13:16:49 2018 UTC (6 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.81: +5 -5 lines
Diff to previous 1.81 (colored)

Increase SO_RCVBUF of the ospf socket to 256k having this buffer can result
in packet loss on busy and big networks and therefor to instability.
Also adjust the SO_SNDBUF to real 64k just for consistency.
From camiel@

Revision 1.81 / (download) - annotate - [select for diffs], Sat Dec 5 12:20:13 2015 UTC (8 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.80: +2 -16 lines
Diff to previous 1.80 (colored)

Pledge ospfd SE ("stdio inet mcast") and RDE ("stdio") move some code
around to make it possible. Parent can't be pledged at the moment because
of carp ioctl (carp demote). Putting it in so that people can test.
OK benno@

Revision 1.80 / (download) - annotate - [select for diffs], Sun Nov 22 13:09:10 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.79: +4 -2 lines
Diff to previous 1.79 (colored)

Improve ABR support especially for self-originated stub networks.
This seems to solve the last issues people reported when using ospfd
in multiple areas. OK sthen@ prodding by deraadt@

Revision 1.79 / (download) - annotate - [select for diffs], Sun Sep 27 17:31:50 2015 UTC (8 years, 8 months ago) by stsp
Branch: MAIN
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored)

As done for bgpd recently, rename if_mediatype to if_type in ospfd/ospf6d.
And some ifmedia64 fixes.
"move forward" deraadt@

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jul 20 23:45:39 2015 UTC (8 years, 10 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.77: +5 -3 lines
Diff to previous 1.77 (colored)

Fix a segfault at startup when if_change() ist called before
imsg_init() exposed by the second part of this diff which makes
carp(4) interfaces be recognized to be in "backup" mode on start-up.

Problem analyzed and fix provided by Johan Ymerson, thanks!

ok claudio@, mpi@

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jul 19 01:59:32 2015 UTC (8 years, 10 months ago) by benno
Branch: MAIN
Changes since 1.76: +2 -4 lines
Diff to previous 1.76 (colored)

revert previous

    Properly handle carp(4) interfaces in "backup" mode on start-up.

    Problem analyzed and fix provided by Johan Ymerson, thanks!

    ok claudio@, benno@

it breaks on systems without carp because iev_ospfe is not initiallized
at the time kif_init() is called in main.

Revision 1.76 / (download) - annotate - [select for diffs], Sat Jul 18 15:57:14 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.75: +5 -3 lines
Diff to previous 1.75 (colored)

Properly handle carp(4) interfaces in "backup" mode on start-up.

Problem analyzed and fix provided by Johan Ymerson, thanks!

ok claudio@, benno@

Revision 1.75 / (download) - annotate - [select for diffs], Mon May 14 10:17:21 2012 UTC (12 years ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.74: +3 -2 lines
Diff to previous 1.74 (colored)

Don't display a nonsense uptime for an inactive interface. ldpd fix from
Rafael Zalamena on tech@, I also applied it to ospfd.  ok phessler@

Revision 1.74 / (download) - annotate - [select for diffs], Mon Jul 4 04:34:14 2011 UTC (12 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.73: +2 -4 lines
Diff to previous 1.73 (colored)

LINK_STATE_IS_UP() cleanup userland part. There is no need to special
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.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jun 21 17:31:07 2011 UTC (12 years, 11 months ago) by mikeb
Branch: MAIN
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

Convert SO_RTABLE's protocol level to the SOL_SOCKET;  ok claudio

Revision 1.72 / (download) - annotate - [select for diffs], Mon May 9 12:24:41 2011 UTC (13 years ago) by claudio
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

First bits to support opaque LSA. Type-9, 10 and 11 are LSA that can
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@

Revision 1.71 / (download) - annotate - [select for diffs], Fri May 6 13:50:37 2011 UTC (13 years ago) by claudio
Branch: MAIN
Changes since 1.70: +8 -5 lines
Diff to previous 1.70 (colored)

Do not special case loopback interfaces on init. Instead force them
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@

Revision 1.70 / (download) - annotate - [select for diffs], Sat Jul 3 04:44:52 2010 UTC (13 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

Fix the naming of interfaces and variables for rdomains and rtables
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

Revision 1.69 / (download) - annotate - [select for diffs], Fri May 14 08:30:18 2010 UTC (14 years ago) by sthen
Branch: MAIN
Changes since 1.68: +2 -1 lines
Diff to previous 1.68 (colored)

When merging interfaces after a config reload, the fsm state for interfaces
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@

Revision 1.68 / (download) - annotate - [select for diffs], Tue Feb 16 18:20:37 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.67: +13 -19 lines
Diff to previous 1.67 (colored)

When taking an interface down just try to do the cleanup. In cases where
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@

Revision 1.67 / (download) - annotate - [select for diffs], Tue Feb 16 08:39:05 2010 UTC (14 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.66: +10 -5 lines
Diff to previous 1.66 (colored)

implement support for fast hello packets.

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.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Sep 30 14:39:07 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.65: +4 -2 lines
Diff to previous 1.65 (colored)

Oups, these changes should not have been commited. Revert.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Sep 30 14:37:11 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.64: +3 -5 lines
Diff to previous 1.64 (colored)

Announce a stub network LSA for backup carp interfaces. This should help
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@

Revision 1.64 / (download) - annotate - [select for diffs], Sun Aug 9 23:04:16 2009 UTC (14 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.63: +13 -2 lines
Diff to previous 1.63 (colored)

Scale both receive and send buffer on the raw socket. The default 8192
bytes is not enough for larger networks causing send errors because of
too big packets. OK henning

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jun 5 04:12:52 2009 UTC (15 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.62: +16 -1 lines
Diff to previous 1.62 (colored)

Preliminary rdomain support, all hacked up by reyk@

Revision 1.62 / (download) - annotate - [select for diffs], Sun Apr 26 12:48:06 2009 UTC (15 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

comment typos; no binary change

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jan 1 22:50:13 2009 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.60: +2 -7 lines
Diff to previous 1.60 (colored)

Remove some other useless debug messages that just add unneeded noise.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Sep 11 16:02:55 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

Switch some more baudrates to 64 bit and initialize iface->baudrate.

Revision 1.59 / (download) - annotate - [select for diffs], Tue May 29 22:08:25 2007 UTC (17 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.58: +14 -1 lines
Diff to previous 1.58 (colored)

Demote support for ospfd. It is possible to specify a demote group on
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@

Revision 1.58 / (download) - annotate - [select for diffs], Thu Feb 1 13:25:28 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored)

whitespace cleanup, no binary change.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Feb 1 13:06:00 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.56: +4 -1 lines
Diff to previous 1.56 (colored)

If an interface is going down send out an empty OSPF hello packet so that
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@

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jan 24 14:08:28 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.55: +8 -1 lines
Diff to previous 1.55 (colored)

When deleting a neighbor or a interface make sure that no events are pending.
Needed for reload support.  OK norby@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Nov 28 19:21:15 2006 UTC (17 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

add additional link states to report the half duplex / full duplex
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@

Revision 1.54 / (download) - annotate - [select for diffs], Fri Nov 17 08:55:31 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.53: +77 -82 lines
Diff to previous 1.53 (colored)

Support for multiple networks on one interface. Until now only the main
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@

Revision 1.53 / (download) - annotate - [select for diffs], Wed Sep 27 14:37:38 2006 UTC (17 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.52: +12 -1 lines
Diff to previous 1.52 (colored)

Use IP_RECVIF to get the incomming interface of OSPF packets. Now we use
the source address and the interface index to find the corresponding
struct interface which is less error prone. OK norby@

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 18 11:54:28 2006 UTC (17 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.51: +9 -1 lines
Diff to previous 1.51 (colored)

Correctly leave the all AllDRouters group (224.0.0.6) if the interface was
in state DR or BACKUP. Found while analizing PR5192 with norby@ -- seems to
help but there is still a issue left. OK norby@

Revision 1.51 / (download) - annotate - [select for diffs], Mon Apr 24 20:18:03 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Fix parser to match current behaviour and make auth-type et al. part of the
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@

Revision 1.50 / (download) - annotate - [select for diffs], Sun Apr 16 11:40:54 2006 UTC (18 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

KNF

Revision 1.49 / (download) - annotate - [select for diffs], Thu Mar 23 18:37:34 2006 UTC (18 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

List interfaces they way we list neighbors etc.
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@

Revision 1.48 / (download) - annotate - [select for diffs], Wed Mar 15 13:25:33 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.47: +1 -2 lines
Diff to previous 1.47 (colored)

Looks like auth-type simple was busted since a long time. We bcmp() a
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@

Revision 1.47 / (download) - annotate - [select for diffs], Mon Mar 13 09:36:06 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.46: +27 -52 lines
Diff to previous 1.46 (colored)

The return value of the start/stop timer functions is almost never checked.
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@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Mar 9 18:11:34 2006 UTC (18 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.45: +10 -1 lines
Diff to previous 1.45 (colored)

Track interface uptime.

ok claudio@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 9 15:43:21 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.44: +4 -66 lines
Diff to previous 1.44 (colored)

Move *_name functions to log.c and use these for both ospfd and ospfctl.
Stuff that is only used in ospfd debug messages is simplified.
OK norby@

Revision 1.44 / (download) - annotate - [select for diffs], Thu Mar 9 13:37:04 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.43: +10 -9 lines
Diff to previous 1.43 (colored)

KNF, remove some unneded type casts and add some ARGSUSED. This makes lint
almost happy.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Mar 9 09:32:37 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.42: +12 -1 lines
Diff to previous 1.42 (colored)

if_event_names is only used by interface.c so move it there.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Mar 8 15:35:07 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Spaces and other minor cleanup.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jan 5 15:53:36 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.40: +25 -3 lines
Diff to previous 1.40 (colored)

Make ospfd respect carp(4) interfaces and their weird behaviour. They will
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@

Revision 1.40 / (download) - annotate - [select for diffs], Thu Dec 15 20:29:06 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.39: +4 -8 lines
Diff to previous 1.39 (colored)

Simpify iface_del() and nbr_del(). make them void funtions as they can not fail
and do not remove a element twice in iface_del(). OK norby@

Revision 1.39 / (download) - annotate - [select for diffs], Sun Dec 4 20:49:47 2005 UTC (18 years, 6 months ago) by norby
Branch: MAIN
Changes since 1.38: +12 -1 lines
Diff to previous 1.38 (colored)

Increase the receive buffer of the raw socket.

Prevents some of the retransmitting during bulk ls update transfers.

ok claudio@

Revision 1.38 / (download) - annotate - [select for diffs], Wed Oct 19 21:43:20 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

fix some spellings in comments.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Oct 18 15:40:36 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.36: +1 -11 lines
Diff to previous 1.36 (colored)

Cleanup interface code a minimal bit. There is no need for if_shutdown(),
especially it got called in the wrong place.  OK norby@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Oct 12 09:25:57 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.35: +22 -1 lines
Diff to previous 1.35 (colored)

If router is DR or BDR join the AllDRouter list (and leave it if otherwise).
OK norby@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Sep 28 20:38:31 2005 UTC (18 years, 8 months ago) by msf
Branch: MAIN
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

- use proper function name in log message

ok norby@

Revision 1.34 / (download) - annotate - [select for diffs], Sat Sep 24 21:10:32 2005 UTC (18 years, 8 months ago) by msf
Branch: MAIN
Changes since 1.33: +3 -1 lines
Diff to previous 1.33 (colored)

- add auth_type and auth_keyid to struct ctl_iface
- have ospfctl tell us when we are using authentication with 'show interface'

ok claudio@ norby@

Revision 1.33 / (download) - annotate - [select for diffs], Sat Sep 17 20:03:35 2005 UTC (18 years, 8 months ago) by msf
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

- add get_rtr_id() based on bgpd's get_bgpid()
- 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@

Revision 1.32 / (download) - annotate - [select for diffs], Thu Sep 15 19:42:51 2005 UTC (18 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.31: +9 -5 lines
Diff to previous 1.31 (colored)

Correctly handle loopback interfaces. Mark them as point-to-point networks
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@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Aug 30 21:07:58 2005 UTC (18 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.30: +1 -3 lines
Diff to previous 1.30 (colored)

Fix one of the most fragile part of ospfd -- the interface election code.
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@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jun 21 20:50:26 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.29: +3 -1 lines
Diff to previous 1.29 (colored)

Backout/Disable the change introduced in rev. 1.26. Don't start the hello
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@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jun 13 08:52:47 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

One additional if_act_elect bug. Neighbors in preliminary state (down, attempt
and init) are not electable not only neighbors that are in state down.
OK norby@

Revision 1.28 / (download) - annotate - [select for diffs], Mon Jun 13 08:48:16 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Doh. Fix another stupid copy paste typo. Once again BDR != DR.
OK norby@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jun 13 08:44:24 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored)

add a new fsm transition for IF_EVT_WTIMER in state IF_STA_ANY that simply
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@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jun 13 08:41:16 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored)

start hello timer even if in state IF_STA_WAITING (this makes the startup much
faster and follows the RFC more closely).
OK norby@

Revision 1.25 / (download) - annotate - [select for diffs], Fri May 27 02:14:20 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.24: +22 -20 lines
Diff to previous 1.24 (colored)

Virtual link support.

ok claudio@

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 26 22:31:28 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.23: +3 -8 lines
Diff to previous 1.23 (colored)

Make interface election less verbose.

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 26 19:54:49 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.22: +4 -12 lines
Diff to previous 1.22 (colored)

Simplify and cleanup passive interface handling.

ok claudio@

Revision 1.22 / (download) - annotate - [select for diffs], Thu May 26 18:46:16 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

Support dumping the configuration the way bgpd(8) does it.

This makes it possible to have ospfd(8) parse a configuration file and
display the parsed result.

ok claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Thu May 12 10:14:39 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.20: +15 -2 lines
Diff to previous 1.20 (colored)

Fix multiple bugs in if_act_elect(). In some cases DR were set wrongly
because of a stupid typo that I fixed in rev. 1.6 but forgot to fix the
bug I introduced before because of that typo. Also reset the DR/BDR fields
of iface->self when going to round two. Without the reset it is e.g. not
possible to drop from DR to BDR.
Issue found and patch tested by Stephen Marley
OK norby@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 25 11:31:50 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.19: +26 -36 lines
Diff to previous 1.19 (colored)

Call if_init() later and for each interface separately.
Move code from if_act_start() to if_init() that needs to be called only
once per interface. Especially event_set should be called only once as it
initializes struct event and so may cause corruption of the event queue if
called twice.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Apr 25 09:55:18 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.18: +1 -22 lines
Diff to previous 1.18 (colored)

Move the creation of the ospf_socket from if_init() directly into ospfe().
This makes it possible to call if_init() at a much later time.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 25 09:28:45 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

Call if_init() in ospfe only, neither the rde nor the parent need it.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 25 09:09:56 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.16: +20 -19 lines
Diff to previous 1.16 (colored)

Change order of execution in if_act_reset(). First notify all neighbor
that the interface gets reset (NBR_EVT_KILL_NBR) and than clear all
timers of the interface. The nbr_fsm() may start some of the timers which
has strange results.
Tested by Philip Olsson.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Apr 19 07:34:52 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.15: +5 -9 lines
Diff to previous 1.15 (colored)

Don't call event_set() before event_init().
OK norby@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Mar 31 20:13:22 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Better crypt sequence number initialization.

Suggested by henning@

ok henning@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Mar 31 19:32:10 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.13: +6 -1 lines
Diff to previous 1.13 (colored)

Add support for crypt authentication (MD5).

ok and input claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 29 17:26:35 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

The RFC never mentions anything about transfer, this should be transmit.

From Jason Ackley (thanks).

ok claudio@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Mar 22 22:13:48 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Remove bool cruft.

ok claudio@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Mar 11 12:26:50 2005 UTC (19 years, 2 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

KNF

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 7 10:28:14 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.9: +30 -32 lines
Diff to previous 1.9 (colored)

Track interface state (up/down) and media status. Simplify the code a bit
by using the kif/kroute info while allocating interfaces.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Feb 16 15:23:33 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.8: +27 -10 lines
Diff to previous 1.8 (colored)

Support point to point links.

ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Wed Feb 9 20:40:23 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.7: +12 -2 lines
Diff to previous 1.7 (colored)

Rework of self originated LSA. First of all the code to generate the LSA
is rewritten to use the dynamic buffer api introduced lately.
Add missing parts in the RDE to merge these LSA originated from the OE into
the LSDB with correct seq_num, etc.
Add hooks to the neighbor and interface fsm so that the LSA get updated if
needed. This is not perfect, still many things are missing. OK norby@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 9 17:41:16 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.6: +10 -12 lines
Diff to previous 1.6 (colored)

Fix interface fsm by inserting dummy events and actions as placeholder
for 0. Action 0 was IF_ACT_STRT and that's why if_act_start() got called
multiple times. The inappropriate hack from the previous commit is no
longer needed.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 9 16:37:29 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.5: +5 -4 lines
Diff to previous 1.5 (colored)

Don't elect neighbors that are down and fix a stupid copy-pasto.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 9 16:32:32 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored)

Initialize iface->self only once. if_act_start() may be called multiple
times for a interface.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 7 05:51:00 2005 UTC (19 years, 3 months ago) by david
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

spelling fixes

Revision 1.3 / (download) - annotate - [select for diffs], Wed Feb 2 19:15:07 2005 UTC (19 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

KNF

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 28 17:53:33 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Change my email address to the OpenBSD one since Ericsson has nothing to
do with this software, just happend to be my only valid email address at
the time.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 28 14:05:40 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN

Welcome ospfd
started by Esben Norby some time ago by using the imsg/three process framework
of bgpd. He implemented the basic concept plus the ospf finite state machines.
Later I joined and helped him cleanup, debug and extend his work.
Right now it is not particularly useful, major parts are still missing but is
imported to allow more people to work on it.
status:
The basic protocol works for broadcast networks and the LS database is
synchronized and updated. It is not possible to be DR or BDR on a network
and other interface types like point-to-point are not yet supported.
The shortest path tree is not calculated and so no routing information is
exchanged with the kernel FIB.

Not yet connected to the builds.
OK henning@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.