Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161350012
D24574.id71003.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
D24574.id71003.diff
View Options
Index: tcp_usrreq.c
===================================================================
--- tcp_usrreq.c
+++ tcp_usrreq.c
@@ -133,6 +133,8 @@
static void tcp_usrclosed(struct tcpcb *);
static void tcp_fill_info(struct tcpcb *, struct tcp_info *);
+static int tcp_options_support(struct tcpcb *tp, int flags);
+
#ifdef TCPDEBUG
#define TCPDEBUG0 int ostate = 0
#define TCPDEBUG1() ostate = tp ? tp->t_state : 0
@@ -979,6 +981,16 @@
goto out;
}
tp = intotcpcb(inp);
+ if ((flags & MSG_OOB) || (flags & PRUS_OOB)) {
+ if ((error = tcp_options_support(tp, PRUS_OOB)) != 0) {
+ if (control)
+ m_freem(control);
+ if (m && (flags & PRUS_NOTREADY) == 0)
+ m_freem(m);
+ error = ECONNRESET;
+ goto out;
+ }
+ }
TCPDEBUG1();
if (nam != NULL && tp->t_state < TCPS_SYN_SENT) {
switch (nam->sa_family) {
@@ -1362,6 +1374,19 @@
NET_EPOCH_EXIT(et);
}
+static int
+tcp_options_support(struct tcpcb *tp, int flags)
+{
+ /*
+ * For now we say we support anything, we
+ * need to change this so that we ask the
+ * specific stack and let it decide if
+ * it supports PRUS_OOB or possibly other
+ * flags in the future.
+ */
+ return (0);
+}
+
/*
* Receive out-of-band data.
*/
@@ -1381,6 +1406,10 @@
goto out;
}
tp = intotcpcb(inp);
+ error = tcp_options_support(tp, PRUS_OOB);
+ if (error) {
+ goto out;
+ }
TCPDEBUG1();
if ((so->so_oobmark == 0 &&
(so->so_rcv.sb_state & SBS_RCVATMARK) == 0) ||
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 4, 1:46 AM (3 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34645519
Default Alt Text
D24574.id71003.diff (1 KB)
Attached To
Mode
D24574: TCP OOB data handling
Attached
Detach File
Event Timeline
Log In to Comment