Linux 2.6 IPv6 interface "ip6tnl0"

This is a discussion on Linux 2.6 IPv6 interface "ip6tnl0" within the SNMP Users forums, part of the Networking and Network Related category; Hope this posting is OK although I'm not on this list. With Linux 2.6 IPv6 came a tunnel ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-27-2005
Gunnar Lindberg
 
Posts: n/a
Default Linux 2.6 IPv6 interface "ip6tnl0"

Hope this posting is OK although I'm not on this list.

With Linux 2.6 IPv6 came a tunnel interface, "ip6tnl0".

It breaks the code that extracts interface #, since that algorithm
stops at the first digit and takes the rest as #, i.e. <ip><6tnl0>.

I think the "diff -c" below is an appropriate fix.

Gunnar Lindberg

*** ./agent/mibgroup/mibII/interfaces.c.ORIG Mon Jan 3 16:51:32 2005
--- ./agent/mibgroup/mibII/interfaces.c Fri May 27 06:04:06 2005
***************
*** 1574,1581 ****
--- 1574,1597 ----
* set name and interface# :=20
*/
nnew->if_name =3D (char *) strdup(ifname);
+ #ifdef notdef
+ /* this fails for e.g. "ip6tnl0" */
for (ptr =3D nnew->if_name; *ptr && (*ptr < '0' || *ptr > '9');
ptr++);
+ #endif /* notdef */
+=20
+ ptr =3D nnew->if_name;
+ /* start from end of string */
+ while (*ptr)
+ ptr++;
+ /* trailing digits are interface # */
+ while (ptr !=3D nnew->if_name)
+ {
+ ptr--;
+ if (*ptr < '0' || *ptr > '9')
+ break;
+ }
+ ptr++;
nnew->if_unit =3D strdup(*ptr ? ptr : "");
*ptr =3D 0;
=20


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:52 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0