FreeBSD Bugzilla – Attachment 247056 Details for
Bug 275774
IPv4 Mapper address problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix IPv4 mapped address
0001-WIP-Fix-udp-IPv4-mapper-address.patch (text/plain), 1.65 KB, created by
Emmanuel Vadot
on 2023-12-15 12:26:09 UTC
(
hide
)
Description:
Fix IPv4 mapped address
Filename:
MIME Type:
Creator:
Emmanuel Vadot
Created:
2023-12-15 12:26:09 UTC
Size:
1.65 KB
patch
obsolete
>From 0b39d9daaf6d01fa339c1bd98c5d2c9739fb93a9 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Richard=20K=C3=BCmmel?= <R.Kuemmel@beckhoff.com> >Date: Fri, 15 Dec 2023 12:49:45 +0100 >Subject: [PATCH] WIP: Fix udp IPv4-mapper address > >--- > sys/netinet/udp_usrreq.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c >index 77cbf9d98c83..1d852edab4b3 100644 >--- a/sys/netinet/udp_usrreq.c >+++ b/sys/netinet/udp_usrreq.c >@@ -1061,6 +1061,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, > uint16_t cscov = 0; > uint32_t flowid = 0; > uint8_t flowtype = M_HASHTYPE_NONE; >+ bool use_cached_route = false; > > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_send: inp == NULL")); >@@ -1097,9 +1098,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, > * We will need network epoch in either case, to safely lookup into > * pcb hash. > */ >- if (sin == NULL || >- (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) || >- (flags & PRUS_IPV6) != 0) >+ use_cached_route = sin == NULL || (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0); >+ if (use_cached_route || (flags & PRUS_IPV6) != 0) > INP_WLOCK(inp); > else > INP_RLOCK(inp); >@@ -1450,7 +1450,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, > else > UDP_PROBE(send, NULL, inp, &ui->ui_i, inp, &ui->ui_u); > error = ip_output(m, inp->inp_options, >- INP_WLOCKED(inp) ? &inp->inp_route : NULL, ipflags, >+ use_cached_route ? &inp->inp_route : NULL, ipflags, > inp->inp_moptions, inp); > INP_UNLOCK(inp); > NET_EPOCH_EXIT(et); >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 275774
:
247054
|
247055
| 247056