1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/sys/netinet
Alexander V. Chernikov d375edc9b5 Simplify inet alias handling code: if we're adding/removing alias which
has the same prefix as some other alias on the same interface, use
newly-added rt_addrmsg() instead of hand-rolled in_addralias_rtmsg().

This eliminates the following rtsock messages:

Pinned RTM_ADD for prefix (for alias addition).
Pinned RTM_DELETE for prefix (for alias withdrawal).

Example (got 10.0.0.1/24 on vlan4, playing with 10.0.0.2/24):

before commit, addition:

  got message of size 116 on Fri Jan 10 14:13:15 2014
  RTM_NEWADDR: address being added to iface: len 116, metric 0, flags:
  sockaddrs: <NETMASK,IFP,IFA,BRD>
   255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

  got message of size 192 on Fri Jan 10 14:13:15 2014
  RTM_ADD: Add Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,PINNED>
  locks:  inits:
  sockaddrs: <DST,GATEWAY,NETMASK>
   10.0.0.0 10.0.0.2 (255) ffff ffff ff

after commit, addition:

  got message of size 116 on Fri Jan 10 13:56:26 2014
  RTM_NEWADDR: address being added to iface: len 116, metric 0, flags:
  sockaddrs: <NETMASK,IFP,IFA,BRD>
   255.255.255.0 vlan4:8.0.27.c5.29.d4 14.0.0.2 14.0.0.255

before commit, wihdrawal:

  got message of size 192 on Fri Jan 10 13:58:59 2014
  RTM_DELETE: Delete Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,PINNED>
  locks:  inits:
  sockaddrs: <DST,GATEWAY,NETMASK>
   10.0.0.0 10.0.0.2 (255) ffff ffff ff

  got message of size 116 on Fri Jan 10 13:58:59 2014
  RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
  sockaddrs: <NETMASK,IFP,IFA,BRD>
   255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

adter commit, withdrawal:

  got message of size 116 on Fri Jan 10 14:14:11 2014
  RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
  sockaddrs: <NETMASK,IFP,IFA,BRD>
   255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

Sending both RTM_ADD/RTM_DELETE messages to rtsock is completely wrong
(and requires some hacks to keep prefix in route table on RTM_DELETE).

I've tested this change with quagga (no change) and bird (*).

bird alias handling is already broken in *BSD sysdep code, so nothing
changes here, too.

I'm going to MFC this change if there will be no complains about behavior
change.

While here, fix some style(9) bugs introduced by r260488
(pointed by glebius and bde).

Sponsored by:	Yandex LLC
MFC after:	4 weeks
2014-01-10 12:13:55 +00:00
..
cc Import an implementation of the CAIA Delay-Gradient (CDG) congestion control 2013-07-02 08:44:56 +00:00
khelp
libalias It'll be okay to use LibAliasDetachHandlers() here, relying 2013-12-25 09:43:51 +00:00
accf_data.c
accf_dns.c
accf_http.c
cc.h
icmp6.h Migrate structs in6_ifstat and icmp6_ifstat to PCPU counters. 2013-07-09 09:59:46 +00:00
icmp_var.h Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
if_atm.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
if_atm.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_ether.c lla_lookup() does modification only when LLE_CREATE is specified. 2014-01-02 08:40:37 +00:00
if_ether.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
igmp_var.h Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
igmp.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
igmp.h
in_cksum.c
in_debug.c
in_gif.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
in_gif.h
in_kdtrace.c dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00
in_kdtrace.h dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00
in_mcast.c In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever 2013-12-24 20:25:18 +00:00
in_pcb.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
in_pcb.h In r227207, to fix the issue with possible NULL inp_socket pointer 2013-07-04 18:38:00 +00:00
in_pcbgroup.c
in_proto.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
in_rmx.c in_ifadown() can be void. 2013-11-01 10:29:10 +00:00
in_systm.h
in_var.h in_ifadown() can be void. 2013-11-01 10:29:10 +00:00
in.c Simplify inet alias handling code: if we're adding/removing alias which 2014-01-10 12:13:55 +00:00
in.h Add more (IPv6) related Internet Protocols: 2013-12-25 20:26:49 +00:00
ip6.h
ip_carp.c Make failure of ifpromisc() a non-fatal error. This makes it possible to 2014-01-03 11:03:12 +00:00
ip_carp.h Migrate struct carpstats to PCPU counters. 2013-07-09 10:02:51 +00:00
ip_divert.c Include necessary headers that now are available due to pollution 2013-10-28 07:29:16 +00:00
ip_divert.h
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_fastfwd.c - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging 2013-11-25 07:38:45 +00:00
ip_fw.h
ip_gre.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
ip_gre.h
ip_icmp.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
ip_icmp.h
ip_id.c Back out r249318, r249320 and r249327 due to a heisenbug most 2013-05-06 16:42:18 +00:00
ip_input.c - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging 2013-11-25 07:38:45 +00:00
ip_ipsec.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
ip_ipsec.h
ip_mroute.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
ip_mroute.h Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPU 2013-07-09 09:50:15 +00:00
ip_options.c
ip_options.h
ip_output.c Fix regression from r249894. Now we pass "gw" as argument to if_output 2014-01-02 10:18:39 +00:00
ip_var.h Move the global M_SKIP_FIREWALL mbuf flags to a protocol layer specific 2013-08-19 11:08:36 +00:00
ip.h
pim_var.h Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
pim.h
raw_ip.c netinet code no longer uses IFA_RTSELF. 2013-11-05 07:45:20 +00:00
sctp_asconf.c Make sure that we don't try to build an ASCONF-ACK chunk 2013-11-07 17:08:09 +00:00
sctp_asconf.h
sctp_auth.c Get rid of the artification limitation enforced by 2013-11-07 18:50:11 +00:00
sctp_auth.h Get rid of the artification limitation enforced by 2013-11-07 18:50:11 +00:00
sctp_bsd_addr.c In 2013-11-30 12:51:19 +00:00
sctp_bsd_addr.h
sctp_cc_functions.c
sctp_constants.h Remove a buggy comparision when setting manually the path MTU. 2013-10-15 20:21:27 +00:00
sctp_crc32.c
sctp_crc32.h
sctp_dtrace_declare.h - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging 2013-11-25 07:38:45 +00:00
sctp_dtrace_define.h dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00
sctp_header.h
sctp_indata.c Remove a stray write operation. 2013-11-16 16:09:09 +00:00
sctp_indata.h Code cleanups. 2013-07-03 18:48:43 +00:00
sctp_input.c Provide human readable debug output. 2013-08-25 12:44:03 +00:00
sctp_input.h
sctp_lock_bsd.h
sctp_os_bsd.h All changes affect only SCTP-AUTH: 2013-09-02 22:48:41 +00:00
sctp_os.h
sctp_output.c Use SCTP_PR_SCTP_TTL when the user provides a positive 2013-11-16 19:57:56 +00:00
sctp_output.h
sctp_pcb.c In 2013-11-30 12:51:19 +00:00
sctp_pcb.h Make the features a 64-bit value instead of 32-bit. 2013-08-12 13:52:15 +00:00
sctp_peeloff.c
sctp_peeloff.h
sctp_ss_functions.c
sctp_structs.h Remove redundant field pr_sctp_on. 2013-09-03 19:31:59 +00:00
sctp_sysctl.c Export the inpcb features as a 64-bit entity. 2013-08-22 20:29:57 +00:00
sctp_sysctl.h Fix a bug were only 2048 streams where usable even though more than 2013-07-05 10:08:49 +00:00
sctp_timer.c Terminate a debug output with a \n. 2013-10-29 20:04:50 +00:00
sctp_timer.h
sctp_uio.h All changes affect only SCTP-AUTH: 2013-09-02 22:48:41 +00:00
sctp_usrreq.c Address some warnings which showed up on the userland version. 2013-12-27 13:07:00 +00:00
sctp_var.h
sctp.h Make the features a 64-bit value instead of 32-bit. 2013-08-12 13:52:15 +00:00
sctputil.c Address some warnings which showed up on the userland version. 2013-12-27 13:07:00 +00:00
sctputil.h
siftr.c Include necessary headers that now are available due to pollution 2013-10-28 07:29:16 +00:00
tcp_debug.c
tcp_debug.h
tcp_fsm.h
tcp_hostcache.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
tcp_hostcache.h
tcp_input.c Draft-ietf-tcpm-initcwnd-05 became RFC6928. 2013-12-26 04:24:08 +00:00
tcp_lro.c Merge r254336 from user/np/cxl_tuning. 2013-08-28 23:00:34 +00:00
tcp_lro.h Merge r254336 from user/np/cxl_tuning. 2013-08-28 23:00:34 +00:00
tcp_offload.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
tcp_offload.h
tcp_output.c dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00
tcp_reass.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
tcp_sack.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
tcp_seq.h
tcp_subr.c dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00
tcp_syncache.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
tcp_syncache.h Introduce spares in the TCP syncache and timewait structures 2013-09-21 10:01:51 +00:00
tcp_timer.c
tcp_timer.h
tcp_timewait.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
tcp_usrreq.c Make TCP_KEEP* socket options readable. At least PostgreSQL wants 2013-11-08 13:04:14 +00:00
tcp_var.h Introduce spares in the TCP syncache and timewait structures 2013-09-21 10:01:51 +00:00
tcp.h
tcpip.h
toecore.c Include necessary headers that now are available due to pollution 2013-10-28 07:29:16 +00:00
toecore.h
udp_usrreq.c - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging 2013-11-25 07:38:45 +00:00
udp_var.h Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
udp.h