Igmpproxy.conf parsing problem



  • The generated igmpproxy.conf configuration file for igmpproxy package looks to be incorrectly formed, or is being incorrectly parsed.

    My igmpproxy.conf looks like :

    
    ##------------------------------------------------------
    ## Enable Quickleave mode (Sends Leave instantly)
    ##------------------------------------------------------
    quickleave
    phyint em1 downstream ratelimit 0 threshold 1
    
    phyint em0 upstream ratelimit 0 threshold 1
    
    phyint em2 disabled
    phyint em3 disabled
    
    

    When I start igmpproxy with '/usr/local/sbin/igmpproxy -d -c /tmp/igmpproxy' I see :

    
    # ./igmpproxy -d -c /tmp/igmpproxy.conf
    igmpproxy, Version 0.1 beta2, Build 110405 
    Copyright 2005 by Johnny Egeland <johnny@rlo.org>Distributed under the GNU GENERAL PUBLIC LICENSE, Version 2 - check GPL.txt
    
    Debu: Searching for config file at '/tmp/igmpproxy.conf'
    Debu: Config: Quick leave mode enabled.
    Debu: Config: Got a phyint token.
    Debu: Config: IF: Config for interface em1.
    Debu: Config: IF: Got downstream token.
    Debu: Config: IF: Got ratelimit token '0'.
    Debu: Config: IF: Got threshold token '1'.
    Debu: IF name : em1
    Debu: Next ptr : 0
    Debu: Ratelimit : 0
    Debu: Threshold : 1
    Debu: State : 2
    Debu: Allowednet ptr : 0
    Debu: Config: Got a phyint token.
    Debu: Config: IF: Config for interface em0.
    Debu: Config: IF: Got upstream token.
    Debu: Config: IF: Got ratelimit token '0'.
    Debu: Config: IF: Got threshold token '1'.
    Debu: IF name : em0
    Debu: Next ptr : 0
    Debu: Ratelimit : 0
    Debu: Threshold : 1
    Debu: State : 1
    Debu: Allowednet ptr : 0
    Debu: Config: Got a phyint token.
    Debu: Config: IF: Config for interface em2.
    Debu: Config: IF: Got disabled token.
    Debu: IF name : em2
    Debu: Next ptr : 0
    Debu: Ratelimit : 0
    Debu: Threshold : 1
    Debu: State : 0
    Debu: Allowednet ptr : 0
    Debu: Config: Got a phyint token.
    Debu: Config: IF: Config for interface em3.
    Debu: IF name : em3
    Debu: Next ptr : 0
    Debu: Ratelimit : 0
    Debu: Threshold : 1
    Debu: State : 2
    Debu: Allowednet ptr : 0</johnny@rlo.org> 
    

    So I see that tokens for em1 'downstream', em0 'upstream', and em2 'disabled' are being correctly parsed, but the 'disabled' token for em3 is not.

    Looking further down the log I see that em3 is then inadvertently being setup as an active (downstream?) interface :

    
    Debu: Joining all-routers group 224.0.0.2 on vif [x.x.x.x]
    Note: joinMcGroup: 224.0.0.2 on em1
    Debu: SENT V3 member report   from [x.x.x.x]   to 224.0.0.22
    Debu: Joining all-routers group 224.0.0.2 on vif [y.y.y.y]
    Note: joinMcGroup: 224.0.0.2 on em3
    Debu: SENT V3 member report   from [y.y.y.y]   to 224.0.0.22
    
    

    Workaround is to add an extra '\n' newline at the end of igmpproxy.conf.

    With that extra newline in place, I then see that the 'disabled' token for em3 is parsed and honored :

    
    ...
    Debu: Config: Got a phyint token.
    Debu: Config: IF: Config for interface em3.
    Debu: Config: IF: Got disabled token.
    Debu: IF name : em3
    Debu: Next ptr : 0
    Debu: Ratelimit : 0
    Debu: Threshold : 1
    Debu: State : 0
    Debu: Allowednet ptr : 0
    ...
    
    

    I'm running pfSense 2.0-RC1 (i386) built on Wed Apr 6 23:30:13 EDT 2011



  • Added a newline to every generated igmpproxy config file.
    The fix will be in latest snapshots.

    Thank you for the report.



  • Verified fixed.

    Thanks ermal.



  • fwiw It looks like this was resolved in the igmpproxy parsing code itself a while back :

    http://igmpproxy.git.sourceforge.net/git/gitweb.cgi?p=igmpproxy/igmpproxy;a=commitdiff;h=8ca5a29b56390020f27d4106643cd623cdb12bb2



  • Yeah but there are some patches on our(old) port to make it work better and possibly after 2.0 it will revisit again.


Log in to reply