Hello.
I wrote to Mr. Steven Barth about netifd. He asked to send my question to
this email, if I don't manage to solve it.
I use the openWrt version from trunk r35509 for x86 configuration. I
can'not create alias. There are my settings and output "ip addr"
*config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config alias
option interface lan
option ipaddr 10.0.0.1
*
*ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen
1000
link/ether 00:a0:d1:53:a9:e3 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0
*
I found the following function in the sourse code of netifd and added some
debug there. I marked the places, where I got debug, with green colour.
*static bool __interface_add(struct interface *iface, struct blob_attr
*config, bool alias)
{
struct blob_attr *tb[IFACE_ATTR_MAX];
struct blob_attr *cur;
blobmsg_parse(iface_attrs, IFACE_ATTR_MAX, tb,
blob_data(config), blob_len(config));
if (alias) {
printf ("%s:%d\n",__FUNCTION__,__LINE__);
if ((cur = tb[IFACE_ATTR_INTERFACE])){
printf ("%s:%d\n",__FUNCTION__,__LINE__);
iface->parent_ifname = blobmsg_data(cur);
}
if (!iface->parent_ifname) {
printf ("%s:%d\n",__FUNCTION__,__LINE__);
return false;
}
printf ("%s:%d\n",__FUNCTION__,__LINE__);
} else {
if ((cur = tb[IFACE_ATTR_IFNAME])){
iface->ifname = blobmsg_data(cur);
} }
iface->config = config;
vlist_add(&interfaces, &iface->node, iface->name);
return true;
}*
Why cannot alias be created in my case?
Thanks!
---------- Forwarded message ----------
From: Steven Barth <[email protected]>
Date: 2013/2/8
Subject: Re: about netifd
To: Дмитрий Оботуров <[email protected]>
Hello,
yes the alias-support is still in there. However depending on what you used
to check (e.g. ifconfig) the additional IP address might just not appear.
If you feel the need to check the address is there install the
iproute-utility or enable the respective busybox applet in your config and
check with. "ip addr"
If there is any problem, please contact the mailinglist
[email protected].**org <[email protected]> with
your issue and include more information like the version / revision you are
using and the output of said "ip addr".
Cheers,
Steven
On 08.02.2013 13:32, Дмитрий Оботуров wrote:
> Good afternoon, Steven.
>
> Sorry for asking you a stupid question, but it is about the netifd program.
>
> There is the commit from 2011-10-18, where the support alias is added.
> Are alias supported in the last version of netifd?
>
> My configuration file /etc/config/network in openWrt looks like the
> following:
>
> |config interface 'lan'
> option ifname 'eth0'
> option proto 'static'
> option ipaddr '192.168.1.1'
> option netmask '255.255.255.0'
>
> config alias
> option interface 'lan'
> option proto 'static'
> option ipaddr '10.0.0.1'
> option netmask '255.255.255.0'
> |
>
> |
> |
>
> But alias can not be created.
>
> Thanks.
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel