Page MenuHomeFreeBSD

D49041.diff
No OneTemporary

D49041.diff

diff --git a/sys/netinet/in.h b/sys/netinet/in.h
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -672,7 +672,7 @@
struct ifnet; struct mbuf; /* forward declarations for Standard C */
struct in_ifaddr;
-bool in_broadcast(struct in_addr, struct ifnet *);
+bool in_ifnet_broadcast(struct in_addr, struct ifnet *);
bool in_ifaddr_broadcast(struct in_addr, struct in_ifaddr *);
int in_canforward(struct in_addr);
int in_localaddr(struct in_addr);
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1293,7 +1293,7 @@
* Return true if the address might be a local broadcast address.
*/
bool
-in_broadcast(struct in_addr in, struct ifnet *ifp)
+in_ifnet_broadcast(struct in_addr in, struct ifnet *ifp)
{
struct ifaddr *ifa;
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c
--- a/sys/netinet/in_rmx.c
+++ b/sys/netinet/in_rmx.c
@@ -71,7 +71,7 @@
* add these routes to support some cases with active-active
* load balancing. Given that, retain this support.
*/
- if (in_broadcast(addr4->sin_addr, nh->nh_ifp))
+ if (in_ifnet_broadcast(addr4->sin_addr, nh->nh_ifp))
is_broadcast = true;
} else if (mask4->sin_addr.s_addr == 0)
nhop_set_pxtype_flag(nh, NHF_DEFAULT);
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -538,7 +538,7 @@
*/
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)))
m->m_flags |= M_MCAST;
- else if (in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
+ else if (in_ifnet_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
m->m_flags |= M_BCAST;
netisr_queue_src(NETISR_IP, (uintptr_t)so, m);
DIVSTAT_INC(inbound);
diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h
--- a/sys/netinet/sctp_os_bsd.h
+++ b/sys/netinet/sctp_os_bsd.h
@@ -342,7 +342,7 @@
} while(0)
/* Other m_pkthdr type things */
-#define SCTP_IS_IT_BROADCAST(dst, m) ((m->m_flags & M_PKTHDR) ? in_broadcast(dst, m->m_pkthdr.rcvif) : 0)
+#define SCTP_IS_IT_BROADCAST(dst, m) ((m->m_flags & M_PKTHDR) ? in_ifnet_broadcast(dst, m->m_pkthdr.rcvif) : 0)
#define SCTP_IS_IT_LOOPBACK(m) ((m->m_flags & M_PKTHDR) && ((m->m_pkthdr.rcvif == NULL) || (m->m_pkthdr.rcvif->if_type == IFT_LOOP)))
/* This converts any input packet header
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1290,7 +1290,7 @@
* global or subnet broad- or multicast address.
* Note that it is quite possible to receive unicast
* link-layer packets with a broadcast IP address. Use
- * in_broadcast() to find them.
+ * in_ifnet_broadcast() to find them.
*/
if (m->m_flags & (M_BCAST|M_MCAST)) {
if ((s = tcp_log_addrs(&inc, th, NULL, NULL)))
@@ -1335,7 +1335,7 @@
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
IN_MULTICAST(ntohl(ip->ip_src.s_addr)) ||
ip->ip_src.s_addr == htonl(INADDR_BROADCAST) ||
- in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {
+ in_ifnet_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {
if ((s = tcp_log_addrs(&inc, th, NULL, NULL)))
log(LOG_DEBUG, "%s; %s: Listen socket: "
"Connection attempt from/to broad- "
@@ -3522,7 +3522,7 @@
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
IN_MULTICAST(ntohl(ip->ip_src.s_addr)) ||
ip->ip_src.s_addr == htonl(INADDR_BROADCAST) ||
- in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
+ in_ifnet_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
goto drop;
}
#endif
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -583,7 +583,7 @@
}
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
- in_broadcast(ip->ip_dst, ifp))
+ in_ifnet_broadcast(ip->ip_dst, ifp))
return (udp_multi_input(m, proto, udp_in));
pcbinfo = udp_get_inpcbinfo(proto);

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 22, 4:27 PM (6 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16774875
Default Alt Text
D49041.diff (3 KB)

Event Timeline