Modify

Opened 11 years ago

Closed 11 years ago

#1611 closed defect (fixed)

incorrect broadcast mask calculated from netmask

Reported by: chris@… Owned by: developers
Priority: normal Milestone:
Component: kernel Version:
Keywords: Cc:

Description

Kamikaze build r6353

The wrong bcast is calculated from the netmask

I have configured

#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    static
        option ipaddr   10.0.0.1
        option netmask  255.255.255.0

And the Interface is plumbed with the following

eth0.1    Link encap:Ethernet  HWaddr 00:13:10:AB:85:67  
          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ie: bcast is set to 10.255.255.255 - but should be 10.0.0.255.

If I set it manually

ifconfig eth0.1 broadcast 10.0.0.255

All is OK

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by anonymous

I just realised that accidentally loaded an old version.
Just re-tested with a current version r6947. The same problem is still present

If I specify a broadcast

#### WAN configuration
config interface         wan
        option ifname    "eth0.1"
        option proto     'static'
        option ipaddr    '10.0.0.1'
        option netmask   '255.255.255.0'
        option broadcast '10.0.0.255'

All works well also

comment:2 Changed 11 years ago by anonymous

The wrong broadcast also seems to be calculated on r7509.

comment:3 Changed 11 years ago by tibal@…

I confirm this bug on r7718 with various netmasks.

For example you get :

inet addr:192.0.0.1  Bcast:192.0.0.255  Mask:255.255.0.0

From :

        option ipaddr   192.0.0.1
        option netmask  255.255.0.0

comment:4 Changed 11 years ago by mbm

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [7766]

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.