freebsd-nq/sys/netinet
Alexander V. Chernikov 36402a681f Finish r275196: do not dereference rtentry in if_output() routines.
The only piece of information that is required is rt_flags subset.

In particular, if_loop() requires RTF_REJECT and RTF_BLACKHOLE flags
  to check if this particular mbuf needs to be dropped (and what
  error should be returned).
Note that if_loop() will always return EHOSTUNREACH for "reject" routes
  regardless of RTF_HOST flag existence. This is due to upcoming routing
  changes where RTF_HOST value won't be available as lookup result.

All other functions require RTF_GATEWAY flag to check if they need
  to return EHOSTUNREACH instead of EHOSTDOWN error.

There are 11 places where non-zero 'struct route' is passed to if_output().
For most of the callers (forwarding, bpf, arp) does not care about exact
  error value. In fact, the only place where this result is propagated
  is ip_output(). (ip6_output() passes NULL route to nd6_output_ifp()).

Given that, add 3 new 'struct route' flags (RT_REJECT, RT_BLACKHOLE and
  RT_IS_GW) and inline function (rt_update_ro_flags()) to copy necessary
  rte flags to ro_flags. Call this function in ip_output() after looking up/
  verifying rte.

Reviewed by:	ae
2016-01-09 16:34:37 +00:00
..
cc
khelp
libalias
tcp_stacks Apply the changes from r293284 to one additional file. 2016-01-07 11:54:20 +00:00
accf_data.c
accf_dns.c
accf_http.c
cc.h
icmp6.h
icmp_var.h
if_atm.c
if_atm.h
if_ether.c Remove second EVENTHANDLER_REGISTER slipped in r292978. 2016-01-01 10:15:06 +00:00
if_ether.h Implement interface link header precomputation API. 2015-12-31 05:03:27 +00:00
igmp_var.h
igmp.c
igmp.h
in_cksum.c
in_debug.c
in_fib.c Maintain consistent behavior: make fib4_lookup_nh_ext() return 2016-01-04 17:23:10 +00:00
in_fib.h
in_gif.c
in_kdtrace.c Fix style issues around existing SDT probes. 2015-12-16 23:39:27 +00:00
in_kdtrace.h Fix style issues around existing SDT probes. 2015-12-16 23:39:27 +00:00
in_mcast.c
in_pcb.c Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
in_pcb.h
in_pcbgroup.c
in_proto.c
in_rmx.c Since r256624 we've been leaking routing table allocations 2015-12-22 14:53:19 +00:00
in_rss.c
in_rss.h
in_systm.h
in_var.h Revert r292275 & r292379 2015-12-17 14:41:30 +00:00
in.c Add rib_lookup_info() to provide API for retrieving individual route 2016-01-04 15:03:20 +00:00
in.h
ip6.h
ip_carp.c Revert r292275 & r292379 2015-12-17 14:41:30 +00:00
ip_carp.h
ip_divert.c
ip_divert.h
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
ip_encap.h
ip_fastfwd.c
ip_fw.h
ip_gre.c
ip_icmp.c
ip_icmp.h
ip_id.c
ip_input.c
ip_ipsec.c
ip_ipsec.h
ip_mroute.c Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
ip_mroute.h
ip_options.c
ip_options.h
ip_output.c Finish r275196: do not dereference rtentry in if_output() routines. 2016-01-09 16:34:37 +00:00
ip_reass.c
ip_var.h
ip.h
pim_var.h
pim.h
raw_ip.c Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
sctp_asconf.c
sctp_asconf.h
sctp_auth.c
sctp_auth.h
sctp_bsd_addr.c
sctp_bsd_addr.h
sctp_cc_functions.c Fix style issues around existing SDT probes. 2015-12-16 23:39:27 +00:00
sctp_constants.h
sctp_crc32.c
sctp_crc32.h
sctp_dtrace_declare.h
sctp_dtrace_define.h
sctp_header.h
sctp_indata.c Stop processing of a SACK when the association has been aborted. 2015-12-21 18:52:02 +00:00
sctp_indata.h
sctp_input.c
sctp_input.h
sctp_lock_bsd.h
sctp_os_bsd.h Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2015-12-27 17:33:59 +00:00
sctp_os.h
sctp_output.c Don't implicitly terminate a user message when moving it to the 2015-12-25 18:11:40 +00:00
sctp_output.h
sctp_pcb.c
sctp_pcb.h
sctp_peeloff.c
sctp_peeloff.h
sctp_ss_functions.c
sctp_structs.h Get struct sctp_net_route in sync with struct route again. 2016-01-04 20:34:40 +00:00
sctp_syscalls.c
sctp_sysctl.c
sctp_sysctl.h
sctp_timer.c
sctp_timer.h
sctp_uio.h
sctp_usrreq.c
sctp_var.h
sctp.h
sctputil.c
sctputil.h
siftr.c
tcp_debug.c
tcp_debug.h
tcp_fastopen.c Implementation of server-side TCP Fast Open (TFO) [RFC7413]. 2015-12-24 19:09:48 +00:00
tcp_fastopen.h Implementation of server-side TCP Fast Open (TFO) [RFC7413]. 2015-12-24 19:09:48 +00:00
tcp_fsm.h
tcp_hostcache.c
tcp_hostcache.h
tcp_input.c Historically we have two fields in tcpcb to describe sender MSS: t_maxopd, 2016-01-07 00:14:42 +00:00
tcp_lro.c
tcp_lro.h
tcp_offload.c
tcp_offload.h
tcp_output.c Historically we have two fields in tcpcb to describe sender MSS: t_maxopd, 2016-01-07 00:14:42 +00:00
tcp_pcap.c
tcp_pcap.h
tcp_reass.c Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
tcp_sack.c
tcp_seq.h
tcp_subr.c Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
tcp_syncache.c Implementation of server-side TCP Fast Open (TFO) [RFC7413]. 2015-12-24 19:09:48 +00:00
tcp_syncache.h Implementation of server-side TCP Fast Open (TFO) [RFC7413]. 2015-12-24 19:09:48 +00:00
tcp_timer.c Historically we have two fields in tcpcb to describe sender MSS: t_maxopd, 2016-01-07 00:14:42 +00:00
tcp_timer.h
tcp_timewait.c
tcp_usrreq.c Historically we have two fields in tcpcb to describe sender MSS: t_maxopd, 2016-01-07 00:14:42 +00:00
tcp_var.h Historically we have two fields in tcpcb to describe sender MSS: t_maxopd, 2016-01-07 00:14:42 +00:00
tcp.h Implementation of server-side TCP Fast Open (TFO) [RFC7413]. 2015-12-24 19:09:48 +00:00
tcpip.h
toecore.c (Temporarily) remove route_redirect_event eventhandler. 2016-01-09 06:26:40 +00:00
toecore.h
udp_usrreq.c Fixed comment placement. 2015-12-24 13:57:43 +00:00
udp_var.h
udp.h
udplite.h