ip_fastfwd: style(9) tidy for r367628
Discussed with: gnn MFC with: r367628
This commit is contained in:
parent
54819c9a62
commit
9b03c658ff
@ -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
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user