Changeset 2ff150e in mainline for uspace/srv/inet/inet.c


Ignore:
Timestamp:
2012-02-13T08:25:46Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
081971b
Parents:
fe4310f
Message:

Correct handling of IP protocol field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/inet/inet.c

    rfe4310f r2ff150e  
    101101}
    102102
    103 static int inet_route_packet(inet_dgram_t *dgram, uint8_t ttl, int df)
     103static int inet_route_packet(inet_dgram_t *dgram, uint8_t proto, uint8_t ttl,
     104    int df)
    104105{
    105106        inet_addrobj_t *addr;
     
    108109        if (addr != NULL) {
    109110                /* Destination is directly accessible */
    110                 return inet_addrobj_send_dgram(addr, dgram, ttl, df);
     111                return inet_addrobj_send_dgram(addr, dgram, proto, ttl, df);
    111112        }
    112113
     
    117118
    118119static int inet_send(inet_client_t *client, inet_dgram_t *dgram,
    119     uint8_t ttl, int df)
    120 {
    121         return inet_route_packet(dgram, ttl, df);
     120    uint8_t proto, uint8_t ttl, int df)
     121{
     122        return inet_route_packet(dgram, proto, ttl, df);
    122123}
    123124
     
    177178        }
    178179
    179         rc = inet_send(client, &dgram, ttl, df);
     180        rc = inet_send(client, &dgram, client->protocol, ttl, df);
    180181
    181182        free(dgram.data);
Note: See TracChangeset for help on using the changeset viewer.