[Xorp-hackers] [PATCH 1/2] xorp: fea: data_plane: ifconfig: Check if we can set destination address for vif(IPv6)

"Igor Maravić" igorm at etf.rs
Tue Mar 27 03:39:53 PDT 2012


Ben,
this is the config that I use:

---

/* XORP configuration file
 *
 * Configuration format: 1.1
 * XORP version: 1.8.5
 * Date: 2012/02/28 10:17:12.863958
 * Host: igor
 * User: root
 */

fea {
    unicast-forwarding4 {
        disable: false
    }
}
interfaces {
    restore-original-config-on-shutdown: false
    interface eth0 {
        description: ""
        disable: false
        discard: false
        unreachable: false
        management: false
        parent-ifname: ""
        iface-type: ""
        vid: ""
        vif eth0 {
            disable: false
            address 10.10.10.10 {
                prefix-length: 24
                broadcast: 10.10.10.255
                disable: false
            }
        }
    }
}

---
It sets vif's address without any problems.

When I want to add new vif address this is what I get:

---
root at igor# set interfaces interface eth0 vif eth0 address 10.10.1.2 prefix-length 24
[edit]
root at igor# commit
Commit Failed
102 Command failed  push_config failed: Interface/Vif/Address error on eth0/eth0/10.10.1.2: Can't set broadcast address for if: eth0 vif: eth0because it isn't broadcast capable
---

I looked code a bit and there is another solution. I can leave a strict check.
I only moved the check if config and system configuration are different, bellow the code where we are changing
config->broadcast flag to be equal to system-broadcast flag.

I'm sending this patch.

Unfortunately I don't have ppp interface to test this.
BR
Igor




More information about the Xorp-hackers mailing list