summaryrefslogtreecommitdiff
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorHarout Hedeshian <harouth@codeaurora.org>2015-06-05 13:23:01 -0600
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:09:44 -0700
commit63bb8bb2cc1a3ff07ead253d6922813ab7443348 (patch)
tree36dacc2454e289f36875f8687e5c7588cfc6f9a0 /net/ipv4/udp.c
parenta511f282c937738fcd8d0be8d1d8df0dd028905e (diff)
net: Indicate whether a socket is a transparent socket
Modify the printout functions for IPv4-TCP, IPv4-UDP, IPv6-TCP, IPv6-UDP, such that the state for the socket is printed as state = state | 0x80. The actual socket state is unmodified. This change is required for the user space to determine whether a socket is a transparent socket, and to determine if the socket holder intends to consume packets locally or to forward them to an external processor. Change-Id: I2ca403b4c2c74e7ddcdbda53e4ba43613bae9c42 Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 6b0887de150f..510fcd68aaef 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2433,6 +2433,8 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
__u8 state = sp->sk_state;
if (up->encap_rcv)
state |= 0xF0;
+ else if (inet->transparent)
+ state |= 0x80;
seq_printf(f, "%5d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d",