bugSystem V style init programs - Bugs: bug #29497, last incorrectly displays IPv6...

 
 

bug #29497: last incorrectly displays IPv6 addresses

Submitted by:  Petr Lautrbach <plautrba>
Submitted on:  Fri 09 Apr 2010 03:18:03 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Dr. Werner Fink <wfink>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 Apr 2010 03:18:03 PM UTC, original submission:

Hello.

This is based on https://bugzilla.redhat.com/show_bug.cgi?id=573346

last -ai shows fdd2:: ipv6 addresses as ipv4 address.

There is int dns_lookup() function in last.c using following heuristic to determine type of ip address:

1. Current IPv6 range uses 2000-3fff or fec0-feff.
Outside of that is illegal and must be IPv4.
2. If last 3 bytes are 0, must be IPv4
3. If IPv6 in IPv4, handle as IPv4

fec0-feff is deprecated now and FC00::/7 is correct Local Unicast range according to http://www.iana.org/assignments/ipv6-address-space/

Attached patch changes this heuristic to simpler one:
1. If last 3 4bytes are 0, must be IPv4
2. If IPv6 in IPv4, handle as IPv4
3. Anything else is IPv6

There are still two possible fail positives:
1. utmp structure had not been zeroed before filled - I haven't seen code which doesn't do it
2. Addresses like FED0:: will be still regarded as IPv4 - same as old code and there is probably no chance to detect it correctly.

Petr Lautrbach <plautrba>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #20173:  sysvinit-last-ipv6-heuristic.patch added by plautrba (1KiB - text/x-c - change ipv6 detection in last.c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by plautrba (Submitted the item)
  • -unavailable- added by plautrba
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 Mar 2011 04:17:30 PM UTCwfinkAssigned toNone=>wfink
      Open/ClosedOpen=>Closed
    Fri 11 Mar 2011 04:15:42 PM UTCwfinkStatusNone=>Fixed
    Fri 09 Apr 2010 03:18:03 PM UTCplautrbaAttached File-=>Added sysvinit-last-ipv6-heuristic.patch, #20173
      Carbon-Copy-=>Added plautrba

    Back to the top


    Powered by Savane 3.1-cleanup1