I have this small DNS

Odd Arild Olsen oao at fibula.no
Sun Jan 1 09:49:06 UTC 2006


I have missed some messages from the list lately, but here is a 
comment/question on the subject:

Leading 0 number in a part of a dotted quad IP-address  taken as octal, e.g. 
192.168.054.100->192.168.44.100:
I assume this bug is caused in the inet_aton function since the first release 
only used strings for IP and RIP. But is this a bug?

IP-addresses are often called dotted decimal, but check the aton_inet source 
in uClibc libc/inet/addr.c:
 * Each part may be decimal, octal, or hexadecimal as in ISO C.
 * 0x or 0X    -> hexadecimal
 * leading 0   -> octal
 * all else    -> decimal
This indicates that octal numbers are allowed for. There is probably a RFC 
which defines this exactly, I don't know yet. 

If we want to follow this, the formats now used in scdns for the sscanf 
functions should be changed from %u to %i, or we can revert back to handle 
the IPs as strings. 

Newest version is now http://www.oao.no/filer/scdns-22.tgz

oao









On Friday 30 December 2005 01:09, Odd Arild Olsen wrote:
> This is a DNS siutable for isolated static networks. I have run it with
> uClibc and Busybox. It obviously needs some cleanup. This release is mostly
> to test if there is any demand.
>
> http://www.oao.no/filer/scdns.tar.gz
>
> I must admit that I have not tested this newest version due to the HW being
> away, but I think there are only cosmetic differences.
>
> oao
>
> > ls -l scdns.o
>
> -rw-r--r--  1 oao users 19976 2005-12-30 00:30 scdns.o
>
> > strip scdns.o
> > ls -l scdns.o
>
> -rw-r--r--  1 oao users 4524 2005-12-30 00:38 scdns.o
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox



More information about the busybox mailing list