shithub: riscv

Download patch

ref: f51f73bdca8b2dcb268a9a2edef4da95e2de738f
parent: 9840ce91cfc069a807b1601863c7579d4d0898b0
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Nov 13 11:47:19 EST 2014

ip: implement "hangup" ctl for udp protocol

--- a/sys/src/9/ip/udp.c
+++ b/sys/src/9/ip/udp.c
@@ -518,6 +518,11 @@
 
 	ucb = (Udpcb*)c->ptcl;
 	if(n == 1){
+		if(strcmp(f[0], "hangup") == 0){
+			qhangup(c->rq, nil);
+			qhangup(c->wq, nil);
+			return nil;
+		}
 		if(strcmp(f[0], "headers") == 0){
 			ucb->headers = 7;	/* new headers format */
 			return nil;