Commit 981eb73
macvlan: Add nodst option to macvlan type source
[ Upstream commit 427f0c8c194b22edcafef1b0a42995ddc5c2227d ]
The default behavior for source MACVLAN is to duplicate packets to
appropriate type source devices, and then do the normal destination MACVLAN
flow. This patch adds an option to skip destination MACVLAN processing if
any matching source MACVLAN device has the option set.
This allows setting up a "catch all" device for source MACVLAN: create one
or more devices with type source nodst, and one device with e.g. type vepa,
and incoming traffic will be received on exactly one device.
v2: netdev wants non-standard line length
Signed-off-by: Jethro Beekman <kernel@jbeekman.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 7470a7a63dc1 ("macvlan: fix possible UAF in macvlan_forward_source()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>1 parent 612801b commit 981eb73
2 files changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
434 | 435 | | |
435 | 436 | | |
436 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
437 | 440 | | |
| 441 | + | |
438 | 442 | | |
| 443 | + | |
| 444 | + | |
439 | 445 | | |
440 | 446 | | |
441 | 447 | | |
| |||
464 | 470 | | |
465 | 471 | | |
466 | 472 | | |
467 | | - | |
| 473 | + | |
| 474 | + | |
468 | 475 | | |
469 | 476 | | |
470 | 477 | | |
| |||
483 | 490 | | |
484 | 491 | | |
485 | 492 | | |
486 | | - | |
| 493 | + | |
| 494 | + | |
487 | 495 | | |
488 | 496 | | |
489 | 497 | | |
| |||
1244 | 1252 | | |
1245 | 1253 | | |
1246 | 1254 | | |
1247 | | - | |
| 1255 | + | |
| 1256 | + | |
1248 | 1257 | | |
1249 | 1258 | | |
1250 | 1259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| |||
0 commit comments