From e3920d71c6273b8d0c773b411717a2d0137ee0ec Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 3 Sep 2022 19:29:06 +0000 Subject: devip: make Rproxy flag explicit --- sys/src/9/ip/iproute.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/9/ip/iproute.c b/sys/src/9/ip/iproute.c index 756308c8a..139c3843c 100644 --- a/sys/src/9/ip/iproute.c +++ b/sys/src/9/ip/iproute.c @@ -312,7 +312,7 @@ addnode(Fs *f, Route **cur, Route *new) if((p->type & Rifc) == 0) copygate(p, new); else if(new->type & Rifc){ - p->type = (p->type & ~Rtrans) | (new->type & Rtrans); + p->type = (p->type & ~(Rproxy|Rtrans)) | (new->type & (Rproxy|Rtrans)); p->ref++; } freeroute(new); @@ -877,6 +877,9 @@ parseroutetype(char *p) case 'p': if(((type ^= Rptpt) & Rptpt) != Rptpt) return -1; break; + case 'y': + if(((type ^= Rproxy) & Rproxy) != Rproxy) return -1; + break; case 't': if(((type ^= Rtrans) & Rtrans) != Rtrans) return -1; break; @@ -906,6 +909,9 @@ routetype(int type, char p[8]) if(type & Rptpt) *p++ = 'p'; + if(type & Rproxy) + *p++ = 'y'; + if(type & Rtrans) *p++ = 't'; -- cgit v1.2.3