Revision 523b929d5446c023e1219aa81455a8c766cac883 authored by Pablo Neira Ayuso on 25 October 2014, 16:40:26 UTC, committed by Pablo Neira Ayuso on 31 October 2014, 11:50:08 UTC
If the packet is received via the bridge stack, this cannot reject packets from the IP stack. This adds functions to build the reject packet and send it from the bridge stack. Comments and assumptions on this patch: 1) Validate the IPv4 and IPv6 headers before further processing, given that the packet comes from the bridge stack, we cannot assume they are clean. Truncated packets are dropped, we follow similar approach in the existing iptables match/target extensions that need to inspect layer 4 headers that is not available. This also includes packets that are directed to multicast and broadcast ethernet addresses. 2) br_deliver() is exported to inject the reject packet via bridge localout -> postrouting. So the approach is similar to what we already do in the iptables reject target. The reject packet is sent to the bridge port from which we have received the original packet. 3) The reject packet is forged based on the original packet. The TTL is set based on sysctl_ip_default_ttl for IPv4 and per-net ipv6.devconf_all hoplimit for IPv6. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 8bfcdf6
File | Mode | Size |
---|---|---|
trigger | ||
Kconfig | -rw-r--r-- | 15.3 KB |
Makefile | -rw-r--r-- | 2.6 KB |
dell-led.c | -rw-r--r-- | 7.5 KB |
led-class.c | -rw-r--r-- | 7.3 KB |
led-core.c | -rw-r--r-- | 3.2 KB |
led-triggers.c | -rw-r--r-- | 8.4 KB |
leds-88pm860x.c | -rw-r--r-- | 6.0 KB |
leds-adp5520.c | -rw-r--r-- | 5.3 KB |
leds-asic3.c | -rw-r--r-- | 4.6 KB |
leds-bd2802.c | -rw-r--r-- | 20.6 KB |
leds-blinkm.c | -rw-r--r-- | 20.5 KB |
leds-clevo-mail.c | -rw-r--r-- | 5.3 KB |
leds-cobalt-qube.c | -rw-r--r-- | 1.9 KB |
leds-cobalt-raq.c | -rw-r--r-- | 3.2 KB |
leds-da903x.c | -rw-r--r-- | 4.1 KB |
leds-da9052.c | -rw-r--r-- | 5.0 KB |
leds-dac124s085.c | -rw-r--r-- | 3.1 KB |
leds-fsg.c | -rw-r--r-- | 5.0 KB |
leds-gpio-register.c | -rw-r--r-- | 1.3 KB |
leds-gpio.c | -rw-r--r-- | 7.6 KB |
leds-hp6xx.c | -rw-r--r-- | 2.2 KB |
leds-ipaq-micro.c | -rw-r--r-- | 3.9 KB |
leds-lm3530.c | -rw-r--r-- | 12.7 KB |
leds-lm3533.c | -rw-r--r-- | 18.2 KB |
leds-lm355x.c | -rw-r--r-- | 13.8 KB |
leds-lm3642.c | -rw-r--r-- | 11.6 KB |
leds-locomo.c | -rw-r--r-- | 2.3 KB |
leds-lp3944.c | -rw-r--r-- | 10.9 KB |
leds-lp5521.c | -rw-r--r-- | 15.6 KB |
leds-lp5523.c | -rw-r--r-- | 20.4 KB |
leds-lp5562.c | -rw-r--r-- | 14.8 KB |
leds-lp55xx-common.c | -rw-r--r-- | 13.6 KB |
leds-lp55xx-common.h | -rw-r--r-- | 5.9 KB |
leds-lp8501.c | -rw-r--r-- | 9.5 KB |
leds-lp8788.c | -rw-r--r-- | 4.3 KB |
leds-lt3593.c | -rw-r--r-- | 4.7 KB |
leds-max8997.c | -rw-r--r-- | 7.9 KB |
leds-mc13783.c | -rw-r--r-- | 8.0 KB |
leds-menf21bmc.c | -rw-r--r-- | 3.1 KB |
leds-net48xx.c | -rw-r--r-- | 2.1 KB |
leds-netxbig.c | -rw-r--r-- | 10.4 KB |
leds-ns2.c | -rw-r--r-- | 9.2 KB |
leds-ot200.c | -rw-r--r-- | 3.0 KB |
leds-pca9532.c | -rw-r--r-- | 11.8 KB |
leds-pca955x.c | -rw-r--r-- | 9.8 KB |
leds-pca963x.c | -rw-r--r-- | 12.1 KB |
leds-pwm.c | -rw-r--r-- | 5.5 KB |
leds-rb532.c | -rw-r--r-- | 1.5 KB |
leds-regulator.c | -rw-r--r-- | 5.1 KB |
leds-s3c24xx.c | -rw-r--r-- | 3.1 KB |
leds-ss4200.c | -rw-r--r-- | 14.4 KB |
leds-sunfire.c | -rw-r--r-- | 5.7 KB |
leds-syscon.c | -rw-r--r-- | 4.3 KB |
leds-tca6507.c | -rw-r--r-- | 21.7 KB |
leds-versatile.c | -rw-r--r-- | 2.5 KB |
leds-wm831x-status.c | -rw-r--r-- | 7.5 KB |
leds-wm8350.c | -rw-r--r-- | 5.6 KB |
leds-wrap.c | -rw-r--r-- | 3.2 KB |
leds.h | -rw-r--r-- | 1.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...