From 9b03c658ff66bb843aa82d1bacf069889a5e3056 Mon Sep 17 00:00:00 2001 From: emaste Date: Fri, 13 Nov 2020 18:25:07 +0000 Subject: [PATCH] ip_fastfwd: style(9) tidy for r367628 Discussed with: gnn MFC with: r367628 --- sys/netinet/ip_fastfwd.c | 9 +++++---- 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. */