fix double-htons of ETH_P
This commit is contained in:
parent
84e4ad616c
commit
b7aee6095a
|
@ -266,7 +266,8 @@ static int tr2eth(struct bridge_state *bst)
|
|||
osmo_revbytebits_buf(ethh.h_dest, TR_ALEN);
|
||||
memcpy(ðh.h_source, trh->saddr, sizeof(ethh.h_source));
|
||||
osmo_revbytebits_buf(ethh.h_source, TR_ALEN);
|
||||
ethh.h_proto = htons(ETH_P_802_2);
|
||||
/* We're doing 80 */
|
||||
//ethh.h_proto = htons(
|
||||
|
||||
mac2str_buf(eth_src, ethh.h_source);
|
||||
mac2str_buf(eth_dst, ethh.h_dest);
|
||||
|
@ -336,13 +337,13 @@ int main(int argc, char **argv)
|
|||
mac_table_read(&bst.eth.mac_tbl, argv[4]);
|
||||
}
|
||||
|
||||
bst.tr.socket = open_packet_socket_for_netdev(tr_name, htons(ETH_P_ALL));
|
||||
bst.tr.socket = open_packet_socket_for_netdev(tr_name, ETH_P_ALL);
|
||||
if (bst.tr.socket < 0) {
|
||||
fprintf(stderr, "Error opening TR\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
bst.eth.socket = open_packet_socket_for_netdev(eth_name, htons(ETH_P_802_2));
|
||||
bst.eth.socket = open_packet_socket_for_netdev(eth_name, ETH_P_802_2);
|
||||
if (bst.eth.socket < 0) {
|
||||
fprintf(stderr, "Error opening ETH\n");
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in New Issue