Skip to content

Commit 5ec9121

Browse files
kot-begemot-ukrichardweinberger
authored andcommitted
um: Fix raw interface options
Raw interface initialization needs QDISC_BYPASS. Otherwise it sees its own packets when transmitting. Fixes: 49da7e6 ("High Performance UML Vector Network Driver") Cc: <[email protected]> Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 4579a1b commit 5ec9121

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/um/drivers/vector_kern.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static int get_transport_options(struct arglist *def)
188188
if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0)
189189
return (vec_rx | VECTOR_BPF);
190190
if (strncmp(transport, TRANS_RAW, TRANS_RAW_LEN) == 0)
191-
return (vec_rx | vec_tx);
191+
return (vec_rx | vec_tx | VECTOR_QDISC_BYPASS);
192192
return (vec_rx | vec_tx);
193193
}
194194

@@ -1241,9 +1241,8 @@ static int vector_net_open(struct net_device *dev)
12411241

12421242
if ((vp->options & VECTOR_QDISC_BYPASS) != 0) {
12431243
if (!uml_raw_enable_qdisc_bypass(vp->fds->rx_fd))
1244-
vp->options = vp->options | VECTOR_BPF;
1244+
vp->options |= VECTOR_BPF;
12451245
}
1246-
12471246
if ((vp->options & VECTOR_BPF) != 0)
12481247
vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr);
12491248

0 commit comments

Comments
 (0)