Commit Graph

94 Commits

Author SHA1 Message Date
msaitoh 9007cd7213 s/successfuly/successfully/ in comment. No functional change. 2020-06-22 07:50:53 +00:00
joerg 2d8c8469e2 Avoid common symbol definitions 2020-04-22 23:53:27 +00:00
roy de09325dff Use RO_MSGFILTER. 2017-04-12 17:02:51 +00:00
christos 22e2f96812 need <sys/stat.h> 2017-01-10 20:57:26 +00:00
ozaki-r 09973b35ac Separate nexthop caches from the routing table
By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html
2016-04-04 07:37:07 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
christos 12768cae83 CVE 1129617: negative arg 2013-11-19 16:42:16 +00:00
christos 3d281e09f8 CID 1125875: Fix memory leak 2013-11-13 21:22:46 +00:00
christos 04ffc4cd1c CID 1125876: File descriptor leak 2013-11-13 21:20:21 +00:00
mrg ef05d8864c ensure variables are initialised 2013-10-30 08:41:57 +00:00
kefren 2e908c5030 sync behaviour with man page: accept spaces, empty lines and comments 2013-10-18 14:14:14 +00:00
wiz 8447fbb10f Sort SEE ALSO. Grammar consistency. 2013-10-18 12:29:52 +00:00
kefren eda7476539 Attempt to write a manpage for ldpd.conf 2013-10-18 10:49:19 +00:00
kefren f86d4fa943 allow setting transport addresses for interfaces into config file
also move passive-interface functionality under interface block
report the correct line for config parsing errors
2013-10-17 18:10:23 +00:00
kefren ee8be8cbb6 zeroize the rest of the comparable struct before adding it to the rb tree 2013-10-12 18:55:40 +00:00
martin ab52354b99 Do not pack struct rt_msg - this voids the alignement restrictions and
causes crashes on alignemen critical archs.
From Matt Thomas.
2013-08-02 16:51:25 +00:00
kefren 2a2cde5c86 Use rbtree for storing peers FEC label bindings 2013-08-02 07:29:56 +00:00
kefren 9661871102 Store local bindings in a rbtree 2013-07-31 06:58:23 +00:00
kefren 7eaad7a39f check route messages sizes more carefully
cache pid
treat every message at a time, even if there are more messages to read
interpret also cloning routes

The latter two should fix the ldp_regen test
2013-07-27 14:35:41 +00:00
kefren 7ecc7b7c66 * don't request explicitly for uid 0 as various system policies may make that
unnecessary
* correct the mplsif message. We don't need an IP address assigned on it
  anymore
2013-07-25 08:40:30 +00:00
kefren 0c8e14c9e8 * use a flag in label struct in order to determine if we should treat the
associated routes using RTF_HOST
* clean the mess in flush_mpls_routes that could result in accessing
  uninitialized memory
2013-07-24 09:05:53 +00:00
kefren ae8b7d0074 don't connect on first hello, there are chances that ours is not seen yet
setproctitle with ldp id - useful for rump kernels testing
fix a memory leak in ldp_peer_new
don't holddown if already holded down
peer sockets are now non-blocking
connected routes deletes are now processed
check if peer is connected before attempting to sending label mappings
2013-07-20 05:16:08 +00:00
kefren e8941bb5d0 * rework the reattachment code
* build an implnull label when a route is added and let mpls_add_label
  to take care of relabelling
* take out last piece of the code where we do route lookups - we should have
  every information we need in labels
* tested these changes using a number of rump kernels and some couple of
  thousands of flapping routes
2013-07-18 11:45:36 +00:00
kefren 9b2110eba6 Make sure labels are always updated when a route is added and when a peer
is added
Rework mpls_add_label according to that so no route refresh is done anymore
Use poll when reading the PF_ROUTE socket
setsockopt SO_USELOOPBACK on the PF_ROUTE socket
Output some information on SIGINFO
Allow map changing for a ldp peer
Finally fix the connected routes admission into labels
Correct the route trigger when a label map is received
2013-07-18 06:07:45 +00:00
kefren 4866020490 send the actual prefix on the wire instead of struct headers
statify
2013-07-16 19:40:01 +00:00
kefren 4a79aafa57 create binding for connected routes on startup
decay an warning message to debug only
2013-07-16 16:55:01 +00:00
kefren 3e54e2f09f retire union_ntoa, replace it with satos
check for valid sizes on PF_ROUTE socket
minor comment update
2013-07-16 02:54:32 +00:00
kefren 0e52e04b03 correct loopback address test
correct addr add/del handling
2013-07-12 08:55:52 +00:00
kefren 949b2852b8 add code for address and address withdraw messages
get rid of unused fields in tlv struct
2013-07-11 18:02:03 +00:00
kefren 046ba50ee2 sprinkle more const 2013-07-11 10:46:19 +00:00
kefren 702fd22f56 speed up a little bit the string<->prefixlen transforms 2013-07-11 09:11:35 +00:00
kefren 5f15a81b16 Local addresses vector is not needed anymore 2013-07-11 05:55:13 +00:00
kefren 2cc7bf11fa Constify a little bit 2013-07-11 05:45:23 +00:00
kefren 42c11e10c7 allow INET6 gateways, split some long lines 2013-06-23 06:40:26 +00:00
kefren 12d5f1b2e0 First send initialize and keep alive after that. Fixes inter-operability
issues regarding session initialization.
2013-05-08 08:57:45 +00:00
kefren dc76929a7a Stop confusing peer hello source with peer transport address 2013-02-05 13:02:33 +00:00
kefren bed325c414 move code around a little bit in order to call get_ldp_peer correctly
check also for transport_address in get_ldp_peer
2013-02-04 20:28:24 +00:00
kefren 0c72a2ff7e * Don't assume INET in connection path
* Lookup in hello list in order to get the correct LDP ID, instead of
  transport address
* Improve an error message
2013-02-04 17:14:31 +00:00
wiz c3af88d3bf Grammar. Sort sections. 2013-02-04 11:02:32 +00:00
kefren f3a2005146 Mention IPv6, operation mode and re-section a bit 2013-02-04 10:53:14 +00:00
kefren c28e590b2c correct the sockaddr compare
modify a couple of debug messages
2013-02-04 09:52:43 +00:00
kefren 898c6f9ff4 Don't try to connect to peers before sending hellos 2013-02-03 19:41:59 +00:00
kefren fcfdc0a1a0 Be a little more strict when sending notifications and checking PDU 2013-01-28 21:35:34 +00:00
kefren 1dc912ec99 Use satos instead of inet_ntop
Fix an alloc problem
2013-01-28 21:08:14 +00:00
kefren 2157479565 permit notifications even if session not fully established 2013-01-28 20:32:04 +00:00
kefren 97dccf752c Fix the transport address TLV mess I created after INET6 convert
Use a single loop to decrement and check hello list keepalives
Display transport address in show hello output
2013-01-28 20:06:52 +00:00
kefren 8835c2ab89 re-enable peer authentication 2013-01-27 05:53:21 +00:00
kefren dd2b4ae9ab * add a new keyword for config file - passive-if and check if it's
allowed to use the interface before join/send mcast
 * check if interface supports multicast before join/send mcast
2013-01-26 21:07:49 +00:00
kefren ad4560771b use predefined group consts/macros instead of ptoning strings 2013-01-26 19:44:52 +00:00
kefren ef9728bbf2 allow compile without -DINET6 2013-01-26 17:46:50 +00:00