Re: [OpenWrt-Devel] [PATCH] igmpproxy: add patch to silence unnecessary logging of downstream igmp traffic

2015-01-17 Thread Felix Fietkau
On 2015-01-08 17:08, Antti Seppälä wrote:
 This patch adds a simple check to silence logging of messages about
 unrecognized igmp packets which originate from devices in local network.
 
 Without this patch igmpproxy floods openwrt syslog with messages such as:
   user.warn igmpproxy[19818]: The source address 192.168.1.175 for group
   239.255.250.250, is not in any valid net for upstream VIF.
 
 Signed-off-by: Antti Seppälä a.sepp...@gmail.com
Applied in r44020, thanks.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] igmpproxy: add patch to silence unnecessary logging of downstream igmp traffic

2015-01-08 Thread Antti Seppälä
This patch adds a simple check to silence logging of messages about
unrecognized igmp packets which originate from devices in local network.

Without this patch igmpproxy floods openwrt syslog with messages such as:
  user.warn igmpproxy[19818]: The source address 192.168.1.175 for group
  239.255.250.250, is not in any valid net for upstream VIF.

Signed-off-by: Antti Seppälä a.sepp...@gmail.com
---
 ...0-Silence-downstream-interface-igmp-messages.patch | 19 +++
 1 file changed, 19 insertions(+)
 create mode 100644 
package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch

diff --git 
a/package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch
 
b/package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch
new file mode 100644
index 000..ccd000c
--- /dev/null
+++ 
b/package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch
@@ -0,0 +1,19 @@
+--- a/src/igmp.c
 b/src/igmp.c
+@@ -139,8 +139,14 @@
+ return;
+ }
+ else if(!isAdressValidForIf(checkVIF, src)) {
+-my_log(LOG_WARNING, 0, The source address %s for group %s, 
is not in any valid net for upstream VIF.,
+-inetFmt(src, s1), inetFmt(dst, s2));
++struct IfDesc *downVIF = getIfByAddress(src);
++if (downVIF  downVIF-state  IF_STATE_DOWNSTREAM) {
++my_log(LOG_NOTICE, 0, The source address %s for group %s 
is from downstream VIF. Ignoring.,
++inetFmt(src, s1), inetFmt(dst, s2));
++} else {
++my_log(LOG_WARNING, 0, The source address %s for group 
%s, is not in any valid net for upstream VIF.,
++inetFmt(src, s1), inetFmt(dst, s2));
++}
+ return;
+ }
+ 
-- 
2.0.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel