mirror of
https://github.com/opnsense/src.git
synced 2026-03-31 06:55:18 -04:00
In the original design of the network stack from the protocol control input method pr_ctlinput was used notify the protocols about two very different kinds of events: internal system events and receival of an ICMP messages from outside. These events were coded with PRC_ codes. Today these methods are removed from the protosw(9) and are isolated to IPv4 and IPv6 stacks and are called only from icmp*_input(). The PRC_ codes now just create a shim layer between ICMP codes and errors or actions taken by protocols. - Change ipproto_ctlinput_t to pass just pointer to ICMP header. This allows protocols to not deduct it from the internal IP header. - Change ip6proto_ctlinput_t to pass just struct ip6ctlparam pointer. It has all the information needed to the protocols. In the structure, change ip6c_finaldst fields to sockaddr_in6. The reason is that icmp6_input() already has this address wrapped in sockaddr, and the protocols want this address as sockaddr. - For UDP tunneling control input, as well as for IPSEC control input, change the prototypes to accept a transparent union of either ICMP header pointer or struct ip6ctlparam pointer. - In icmp_input() and icmp6_input() do only validation of ICMP header and count bad packets. The translation of ICMP codes to errors/actions is done by protocols. - Provide icmp_errmap() and icmp6_errmap() as substitute to inetctlerrmap, inet6ctlerrmap arrays. - In protocol ctlinput methods either trust what icmp_errmap() recommend, or do our own logic based on the ICMP header. Differential revision: https://reviews.freebsd.org/D36731 |
||
|---|---|---|
| .. | ||
| dest6.c | ||
| frag6.c | ||
| icmp6.c | ||
| icmp6.h | ||
| in6.c | ||
| in6.h | ||
| in6_cksum.c | ||
| in6_fib.c | ||
| in6_fib.h | ||
| in6_fib_algo.c | ||
| in6_gif.c | ||
| in6_ifattach.c | ||
| in6_ifattach.h | ||
| in6_jail.c | ||
| in6_mcast.c | ||
| in6_pcb.c | ||
| in6_pcb.h | ||
| in6_proto.c | ||
| in6_rmx.c | ||
| in6_rss.c | ||
| in6_rss.h | ||
| in6_src.c | ||
| in6_var.h | ||
| ip6.h | ||
| ip6_ecn.h | ||
| ip6_fastfwd.c | ||
| ip6_forward.c | ||
| ip6_gre.c | ||
| ip6_id.c | ||
| ip6_input.c | ||
| ip6_mroute.c | ||
| ip6_mroute.h | ||
| ip6_output.c | ||
| ip6_var.h | ||
| ip_fw_nat64.h | ||
| ip_fw_nptv6.h | ||
| mld6.c | ||
| mld6.h | ||
| mld6_var.h | ||
| nd6.c | ||
| nd6.h | ||
| nd6_nbr.c | ||
| nd6_rtr.c | ||
| pim6.h | ||
| pim6_var.h | ||
| raw_ip6.c | ||
| raw_ip6.h | ||
| route6.c | ||
| scope6.c | ||
| scope6_var.h | ||
| sctp6_usrreq.c | ||
| sctp6_var.h | ||
| send.c | ||
| send.h | ||
| tcp6_var.h | ||
| udp6_usrreq.c | ||
| udp6_var.h | ||