severity 330673 important
tags 330673 + patch
thanks
Hi,
On Tue, Oct 18, 2005, ??????? ??????? wrote:
> let's look at code:
> if $IF_IP_RP_FILTER iz non-zero string, and it also equal to 0, we set
> rp_filter to 0.
> if $IF_IP_RP_FILTER iz non-zero string, and it also not equal to 0, we set
> rp_filter to 1.
GOSH! I must have been sleeping while answering you, I was completely
wrong. Sorry, you're correct, there's an important bug here.
> maybe this modification can solve this:
> if [ -n "$IF_IP_RP_FILTER" ]
> then if [ "$IF_IP_RP_FILTER" -eq "0" ]
Yes, I agree with the fix, I attach a patch doing exactly so. This is
really an important problem.
Sorry again.
Cheers,
--
Loïc Minier <[EMAIL PROTECTED]>
diff -urN vlan-1.8.orig/debian/changelog vlan-1.8/debian/changelog
--- vlan-1.8.orig/debian/changelog 2005-10-18 12:53:20.000000000 +0200
+++ vlan-1.8/debian/changelog 2005-10-18 12:58:34.000000000 +0200
@@ -1,3 +1,10 @@
+vlan (1.8-3) unstable; urgency=low
+
+ * Fix /etc/network/if-up.d/ip to not set rp_filter to 1 when it isn't
+ configured.
+
+ -- Loic Minier <[EMAIL PROTECTED]> Tue, 18 Oct 2005 12:57:48 +0200
+
vlan (1.8-2) unstable; urgency=low
* Fixed postdown scripts to remove vlan interfaces when vlan-raw-device is
diff -urN vlan-1.8.orig/debian/ip-if-up vlan-1.8/debian/ip-if-up
--- vlan-1.8.orig/debian/ip-if-up 2005-10-18 12:53:20.000000000 +0200
+++ vlan-1.8/debian/ip-if-up 2005-10-18 12:57:05.000000000 +0200
@@ -1,18 +1,21 @@
#!/bin/sh
# This should probably go into ifupdown
# But usually only those with lots of interfaces (vlans) need these
-if [ -d /proc/sys/net/ipv4/conf/$IFACE ]
+if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ]
then
- if [ -n "$IF_IP_PROXY_ARP" ] && [ "$IF_IP_PROXY_ARP" -eq "1" ]
- then
- echo 1 > /proc/sys/net/ipv4/conf/$IFACE/proxy_arp
- else
- echo 0 > /proc/sys/net/ipv4/conf/$IFACE/proxy_arp
+ if [ -n "$IF_IP_PROXY_ARP" ]; then
+ if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then
+ echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"
+ else
+ echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"
+ fi
fi
- if [ -n "$IF_IP_RP_FILTER" ] && [ "$IF_IP_RP_FILTER" -eq "0" ]
- then
- echo 0 > /proc/sys/net/ipv4/conf/$IFACE/rp_filter
- else
- echo 1 > /proc/sys/net/ipv4/conf/$IFACE/rp_filter
+ if [ -n "$IF_IP_RP_FILTER" ]; then
+ if [ "$IF_IP_RP_FILTER" -eq "0" ]; then
+ echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
+ else
+ echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
+ fi
fi
fi
+