Changeset 0c2d9bb in mainline for uspace/srv/net/inetsrv/sroute.c


Ignore:
Timestamp:
2013-12-25T22:54:29Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b51cf2c
Parents:
f7a33de (diff), ac36aed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/sroute.c

    rf7a33de r0c2d9bb  
    8989}
    9090
    91 /** Find address object matching address @a addr.
     91/** Find static route object matching address @a addr.
    9292 *
    9393 * @param addr  Address
     
    9595inet_sroute_t *inet_sroute_find(inet_addr_t *addr)
    9696{
    97         uint16_t addr_af = inet_addr_get(addr, NULL, NULL);
     97        ip_ver_t addr_ver = inet_addr_get(addr, NULL, NULL);
    9898       
    9999        inet_sroute_t *best = NULL;
     
    102102        fibril_mutex_lock(&sroute_list_lock);
    103103       
    104         list_foreach(sroute_list, link) {
    105                 inet_sroute_t *sroute = list_get_instance(link,
    106                     inet_sroute_t, sroute_list);
    107                
     104        list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) {
    108105                uint8_t dest_bits;
    109                 uint16_t dest_af = inet_naddr_get(&sroute->dest, NULL, NULL,
     106                ip_ver_t dest_ver = inet_naddr_get(&sroute->dest, NULL, NULL,
    110107                    &dest_bits);
    111108               
    112109                /* Skip comparison with different address family */
    113                 if (addr_af != dest_af)
     110                if (addr_ver != dest_ver)
    114111                        continue;
    115112               
     
    147144        fibril_mutex_lock(&sroute_list_lock);
    148145
    149         list_foreach(sroute_list, link) {
    150                 inet_sroute_t *sroute = list_get_instance(link,
    151                     inet_sroute_t, sroute_list);
    152 
     146        list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) {
    153147                if (str_cmp(sroute->name, name) == 0) {
    154148                        fibril_mutex_unlock(&sroute_list_lock);
     
    176170        fibril_mutex_lock(&sroute_list_lock);
    177171
    178         list_foreach(sroute_list, link) {
    179                 inet_sroute_t *sroute = list_get_instance(link,
    180                     inet_sroute_t, sroute_list);
    181 
     172        list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) {
    182173                if (sroute->id == id) {
    183174                        fibril_mutex_unlock(&sroute_list_lock);
     
    207198
    208199        i = 0;
    209         list_foreach(sroute_list, link) {
    210                 inet_sroute_t *sroute = list_get_instance(link,
    211                     inet_sroute_t, sroute_list);
    212 
     200        list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) {
    213201                id_list[i++] = sroute->id;
    214202        }
Note: See TracChangeset for help on using the changeset viewer.