diff options
author | Ed Maste <emaste@FreeBSD.org> | 2020-11-13 18:25:07 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2020-11-13 18:25:07 +0000 |
commit | 360d1232ab075d5825b2ae860dd1718084684413 (patch) | |
tree | 9361b292a7d6538e942e150d0b28dcfc6ba09267 /sys/netinet | |
parent | 0e0457251ba01ccf44fa483ff425d600925571e1 (diff) | |
download | src-360d1232ab075d5825b2ae860dd1718084684413.tar.gz src-360d1232ab075d5825b2ae860dd1718084684413.zip |
ip_fastfwd: style(9) tidy for r367628
Discussed with: gnn
MFC with: r367628
Notes
Notes:
svn path=/head/; revision=367645
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_fastfwd.c | 9 | ||||
-rw-r--r-- | sys/netinet/ip_input.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index c98d9397ed3a..44da6b73e41c 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -131,17 +131,18 @@ ip_redir_alloc(struct mbuf *m, struct nhop_object *nh, */ m_free(mcopy); return (NULL); - } + } mcopy->m_len = min(ntohs(ip->ip_len), M_TRAILINGSPACE(mcopy)); mcopy->m_pkthdr.len = mcopy->m_len; m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t)); - + if (nh != NULL && ((nh->nh_flags & (NHF_REDIRECT|NHF_DEFAULT)) == 0)) { struct in_ifaddr *nh_ia = (struct in_ifaddr *)(nh->nh_ifa); u_long src = ntohl(ip->ip_src.s_addr); - - if (nh_ia != NULL && (src & nh_ia->ia_subnetmask) == nh_ia->ia_subnet) { + + if (nh_ia != NULL && + (src & nh_ia->ia_subnetmask) == nh_ia->ia_subnet) { if (nh->nh_flags & NHF_GATEWAY) *addr = nh->gw4_sa.sin_addr.s_addr; else diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 7d6c4a378b4d..89e2eeefa804 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -111,7 +111,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_VNET | CTLFLAG_RW &VNET_NAME(ipforwarding), 0, "Enable IP forwarding between interfaces"); -/* +/* * Respond with an ICMP host redirect when we forward a packet out of * the same interface on which it was received. See RFC 792. */ |