Re: [PATCH] samples/bpf: Fix dummy program unloading for xdp_redirect samples

2019-02-22 Thread Daniel Borkmann
On 02/21/2019 11:47 PM, Martin Lau wrote: > On Thu, Feb 21, 2019 at 05:30:54PM +0100, Maciej Fijalkowski wrote: >> On Thu, 21 Feb 2019 17:05:39 +0100 >> Toke Høiland-Jørgensen wrote: >> >>> The xdp_redirect and xdp_redirect_map sample programs both load a dummy >>> program onto the egress interfac

Re: [PATCH] samples/bpf: Fix dummy program unloading for xdp_redirect samples

2019-02-21 Thread Martin Lau
On Thu, Feb 21, 2019 at 05:30:54PM +0100, Maciej Fijalkowski wrote: > On Thu, 21 Feb 2019 17:05:39 +0100 > Toke Høiland-Jørgensen wrote: > > > The xdp_redirect and xdp_redirect_map sample programs both load a dummy > > program onto the egress interfaces. However, the unload code checks these > >

Re: [PATCH] samples/bpf: Fix dummy program unloading for xdp_redirect samples

2019-02-21 Thread Maciej Fijalkowski
On Thu, 21 Feb 2019 17:05:39 +0100 Toke Høiland-Jørgensen wrote: > The xdp_redirect and xdp_redirect_map sample programs both load a dummy > program onto the egress interfaces. However, the unload code checks these > programs against the wrong fd number, and thus refuses to unload them. Fix > the

[PATCH] samples/bpf: Fix dummy program unloading for xdp_redirect samples

2019-02-21 Thread Toke Høiland-Jørgensen
The xdp_redirect and xdp_redirect_map sample programs both load a dummy program onto the egress interfaces. However, the unload code checks these programs against the wrong fd number, and thus refuses to unload them. Fix the comparison to avoid this. Fixes: 3b7a8ec2dec3 ("samples/bpf: Check the pr