diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-09-03 17:25:45 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-09-03 17:25:45 +0000 |
commit | 99529b80a3bbe35c5cd5dadf5f106632a2449e84 (patch) | |
tree | 1948c3d1790861a2c233713072bbb026b2114401 /sys/src/9/ip | |
parent | a0048b5c193943708c00dbbd0f5e9fed8c71e515 (diff) |
devip: replicate the nat-flag (Rtrans) when superceding interface route
Superceding interface routes is handled specially,
only incrementing reference count, but need to take
the new Rtrans flag into account.
Diffstat (limited to 'sys/src/9/ip')
-rw-r--r-- | sys/src/9/ip/iproute.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/9/ip/iproute.c b/sys/src/9/ip/iproute.c index c84a36070..756308c8a 100644 --- a/sys/src/9/ip/iproute.c +++ b/sys/src/9/ip/iproute.c @@ -311,8 +311,10 @@ addnode(Fs *f, Route **cur, Route *new) */ if((p->type & Rifc) == 0) copygate(p, new); - else if(new->type & Rifc) + else if(new->type & Rifc){ + p->type = (p->type & ~Rtrans) | (new->type & Rtrans); p->ref++; + } freeroute(new); break; case Roverlaps: |