Changes in uspace/srv/net/inetsrv/sroute.c [f023251:02a09ed] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/sroute.c
rf023251 r02a09ed 89 89 } 90 90 91 /** Find static routeobject matching address @a addr.91 /** Find address object matching address @a addr. 92 92 * 93 93 * @param addr Address … … 95 95 inet_sroute_t *inet_sroute_find(inet_addr_t *addr) 96 96 { 97 ip_ver_t addr_ver= inet_addr_get(addr, NULL, NULL);97 uint16_t addr_af = inet_addr_get(addr, NULL, NULL); 98 98 99 99 inet_sroute_t *best = NULL; … … 102 102 fibril_mutex_lock(&sroute_list_lock); 103 103 104 list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) { 104 list_foreach(sroute_list, link) { 105 inet_sroute_t *sroute = list_get_instance(link, 106 inet_sroute_t, sroute_list); 107 105 108 uint8_t dest_bits; 106 ip_ver_t dest_ver= inet_naddr_get(&sroute->dest, NULL, NULL,109 uint16_t dest_af = inet_naddr_get(&sroute->dest, NULL, NULL, 107 110 &dest_bits); 108 111 109 112 /* Skip comparison with different address family */ 110 if (addr_ ver != dest_ver)113 if (addr_af != dest_af) 111 114 continue; 112 115 … … 144 147 fibril_mutex_lock(&sroute_list_lock); 145 148 146 list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) { 149 list_foreach(sroute_list, link) { 150 inet_sroute_t *sroute = list_get_instance(link, 151 inet_sroute_t, sroute_list); 152 147 153 if (str_cmp(sroute->name, name) == 0) { 148 154 fibril_mutex_unlock(&sroute_list_lock); … … 170 176 fibril_mutex_lock(&sroute_list_lock); 171 177 172 list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) { 178 list_foreach(sroute_list, link) { 179 inet_sroute_t *sroute = list_get_instance(link, 180 inet_sroute_t, sroute_list); 181 173 182 if (sroute->id == id) { 174 183 fibril_mutex_unlock(&sroute_list_lock); … … 198 207 199 208 i = 0; 200 list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) { 209 list_foreach(sroute_list, link) { 210 inet_sroute_t *sroute = list_get_instance(link, 211 inet_sroute_t, sroute_list); 212 201 213 id_list[i++] = sroute->id; 202 214 }
Note:
See TracChangeset
for help on using the changeset viewer.