diff options
author | Simon Chopin <s.chopin@alphalink.fr> | 2020-02-28 11:43:06 +0100 |
---|---|---|
committer | Simon Chopin <s.chopin@alphalink.fr> | 2020-03-18 09:07:38 +0100 |
commit | c4c85030efdba8a927bbca7f8b010a0152f823cb (patch) | |
tree | 6e9f1c837e99b590fd34e7a3acca988ef87a9775 | |
parent | 8a1dcdb180e7e5486e4c9c0f81f02c5a03ec0b31 (diff) | |
download | accel-ppp-xebd-c4c85030efdba8a927bbca7f8b010a0152f823cb.tar.gz accel-ppp-xebd-c4c85030efdba8a927bbca7f8b010a0152f823cb.zip |
ppp: reset the ifindex when moving back to the default namespace
If you move an interface into a namespace where there is alreay an
interface with the same index, the moved interface will get a new index
assigned to it. We need to update our data structure accordingly.
Signed-off-by: Simon Chopin <s.chopin@alphalink.fr>
-rw-r--r-- | accel-pppd/ppp/ppp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index 0606f3f..49b53b1 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -280,6 +280,7 @@ static void destablish_ppp(struct ppp_t *ppp) } ppp->ses.net = def_net; net = def_net; + ppp->ses.ifindex = net->get_ifindex(ppp->ses.ifname); } sprintf(ifr.ifr_newname, "ppp%i", ppp->ses.unit_idx); |