Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108569634
D42430.id129745.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42430.id129745.diff
View Options
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
@@ -897,6 +897,10 @@
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
#ifdef INET
case UDP_ENCAP:
+ if (!INP_CHECK_SOCKAF(so, AF_INET)) {
+ INP_WUNLOCK(inp);
+ return (EINVAL);
+ }
if (!IPSEC_ENABLED(ipv4)) {
INP_WUNLOCK(inp);
return (ENOPROTOOPT);
@@ -944,6 +948,10 @@
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
#ifdef INET
case UDP_ENCAP:
+ if (!INP_CHECK_SOCKAF(so, AF_INET)) {
+ INP_WUNLOCK(inp);
+ return (EINVAL);
+ }
if (!IPSEC_ENABLED(ipv4)) {
INP_WUNLOCK(inp);
return (ENOPROTOOPT);
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -1244,7 +1244,7 @@
#define UDP6_PROTOSW \
.pr_type = SOCK_DGRAM, \
.pr_flags = PR_ATOMIC|PR_ADDR|PR_CAPATTACH, \
- .pr_ctloutput = ip6_ctloutput, \
+ .pr_ctloutput = udp_ctloutput, \
.pr_abort = udp6_abort, \
.pr_attach = udp6_attach, \
.pr_bind = udp6_bind, \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 11:24 AM (2 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16194972
Default Alt Text
D42430.id129745.diff (1 KB)
Attached To
Mode
D42430: udplite: make socketoption available on IPv6 sockets
Attached
Detach File
Event Timeline
Log In to Comment