diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-09-03 19:29:06 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-09-03 19:29:06 +0000 |
commit | e3920d71c6273b8d0c773b411717a2d0137ee0ec (patch) | |
tree | 2c78db4f7ae73cb1a871dcd762ce975832417cb3 /sys/src | |
parent | f3032eb9536fef95fc35a58a6831540b6ffe0893 (diff) |
devip: make Rproxy flag explicit
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/ip/iproute.c | 8 |
1 files changed, 7 insertions, 1 deletions
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'; |