Patches are always welcome! E
On 01/29/2012 07:19 PM, [email protected] wrote: > the access-point.click is an sample at cof/wifi ,i think files at cof/wifi > should been updated 徐晖 > > 原信息 > 主题: Re: [Click] about bug on addressinfo element > 发件人:<[email protected]> > 日期: 2010/10/07 02:38 > > http://read.cs.ucla.edu/click/elements/addressinfo You need to specify the > address in the following format: > AddressInfo(mauer 10.0.0.1 00-50-BA-85-84-A9); > > Roman > > > On 11:27 am 10/06/10 徐晖<[email protected]> wrote:I am new to > click,recently I compile click on openwrt 8.09.2,but I can not > run the "access-point.click" successfully,some error happen at "FromHost(ap, > ap_bssid, ETHER ap_bssid)",more detail can see > /conf/wifi/access-point.click,I > look at the code of "addressinfo.cc" and find the problem at > "AddressInfo::configure" function,the original code is > 107 if (cp_ip_address(parts[j],&x.ip4.a)) > 108 NameInfo::define(NameInfo::T_IP_ADDR, this, parts[0],&x.ip4.a, 4); > 109 else if (cp_ip_prefix(parts[j], x.ip4b.a, x.ip4b.p, false)) { > 110 NameInfo::define(NameInfo::T_IP_PREFIX, this, parts[0],&x.ip4, 8); > 111 if (x.ip4.a.s_addr& ~x.ip4.p.s_addr) > 112 NameInfo::define(NameInfo::T_IP_ADDR, this, parts[0],&x.ip4.a, 4); > 113 } else if (cp_ethernet_address(parts[j], x.ether)) > 114 NameInfo::define(NameInfo::T_ETHERNET_ADDR, this, parts[0], x.ether, 6); > > my modify is > if (cp_ethernet_address(parts[j], x.ether)) > NameInfo::define(NameInfo::T_ETHERNET_ADDR, this, parts[0], x.ether, 6); > if (cp_ip_address(parts[j],&x.ip4.a)) > NameInfo::define(NameInfo::T_IP_ADDR, this, parts[0],&x.ip4.a, 4); > else if (cp_ip_prefix(parts[j], x.ip4b.a, x.ip4b.p, false)) { > NameInfo::define(NameInfo::T_IP_PREFIX, this, parts[0],&x.ip4, 8); > if (x.ip4.a.s_addr& ~x.ip4.p.s_addr) > NameInfo::define(NameInfo::T_IP_ADDR, this, parts[0],&x.ip4.a, 4); > } > > the problem of original code is when interpret the code > "AddressInfo(ap_bssid 10.0.0.1/8 ath1)" at "access-point.click" the program > will not store the mac addr of ath1 at the db,then when interpret the code > "FromHost(ap, ap_bssid, ETHER ap_bssid)" it first find the mac addr > of ap_bssid at the db,but failed,then it will get all the mac addr of the > system's interfaces,and try to get the mac addr of the interface named > "ap_bssid",of course it will fail. > Is my modification right? > > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
