[mrtg-developers] Re: Patch for mrtg-2.10.pre5 ?

Lorenzo Colitti lorenzo at colitti.com
Tue Jul 8 18:06:48 MEST 2003

Rafael Martinez Torres wrote:
> Hi all there:
> I do present this patch to be applied into mrtg-2.10.pre5.

> Basically:
> * General terms:
> IPv6 is activated automatically only if libraries are present. So user
> does not need to know on new flags "--enable-ipv6", and what is most
> important, configuration file format does not need any new parameter.
> "EnableIPv6","ipv4only"... 100% compatible backwards and forward. (Before
> only forward)
> Control code is cleaner, and all the managment of underlying IP-Network is
> shift entirely into SNMP modules. (Except some DNS resolution needed at mrtg)

The --enable-ipv6 option to cfgmaker and the EnableIPv6 option in 
mrtg.cfg were added intentionally, to protect users from possible bugs 
in Socket6 and/or INET6 and make MRTG behave exactly the same as 
previous versions unless the user explicitly turned on IPv6.

If desired, we could enable IPv6 by default (if the libraries are 
present) and remove the options. It would indeed simplify the code, and 
I am all for that. But would this be a good idea? Perhaps it would be 
better to wait for more feedback before doing something like this...

> * SNMP_Session : update
> Now the "ipv4only" at DNS resolution is considered as a "corner case",
> just as the "lenient_source_*_matching" flags.
> -$VERSION = '0.97';
> +$VERSION = '0.98';
> +### Default value for "query_only_IPv4"
> +###
> +### Set this to non-zero when, given a DNS Agent name, resolving
> +### into both IPv6 and IPv4 addresses, your agent does not implement
> +### the SNMP v6, but only SNMP v4.

So, if I understand correctly, what you are doing is changing the 
"ipv4only" flag's name to "query_only_ipv4" and setting it to the same 
value for all targets.

This means that if you have even just one router that doesn't support 
SNMP over IPv6 (e.g. a Cisco router), then you can't use IPv6 for any 
router, because you have to turn on query_only_ipv4 off (by manually 
editing the code (!) in SNMP_Session.pm).

Why do this, when the current code allows you to turn off IPv6 on a 
per-target basis, and all a user needs to do is "cfgmaker --enable-ipv6 
public at router" to have cfgmaker determine if the router needs the flag 
or not?

> * MRTG_lib.pm:
> 	Only the parser for new IPv6 addresses is kept. Don't need to know
> for any new flag on the mrtg.cfg file.

As I said, we could do this very easily with the current code too, but 
is it a good idea?


Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers

More information about the mrtg-developers mailing list