summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@rei2.9hal>2012-03-11 18:18:59 +0100
committercinap_lenrek <cinap_lenrek@rei2.9hal>2012-03-11 18:18:59 +0100
commit25b63636a077a86f24f8226138d96c7257b6ac84 (patch)
tree7072fc9da0c9abb6d4e770d08f716bf54042d4bc
parent81fb4d22e2a123ae172ca35c6a3ad676b8dce488 (diff)
downloadplan9front-25b63636a077a86f24f8226138d96c7257b6ac84.tar.xz
socksd: udp RSV and FRAG must be zero
-rw-r--r--sys/src/cmd/ip/socksd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/socksd.c b/sys/src/cmd/ip/socksd.c
index e9f8723f6..c7a487f7b 100644
--- a/sys/src/cmd/ip/socksd.c
+++ b/sys/src/cmd/ip/socksd.c
@@ -122,7 +122,10 @@ udprelay(int fd, char *dir)
while((r = read(fd, msg.data, sizeof(msg.data))) > 0){
if(r < 4)
continue;
- p = msg.data + 3;
+ p = msg.data;
+ if(p[0] | p[1] | p[2])
+ continue;
+ p += 3;
switch(*p++){
default:
continue;