mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
lib: rename ovs_nd_opt to ovs_nd_lla_opt
Since ovs_nd_mtu_opt and ovs_nd_prefix_opt is introducted, rename ovs_nd_opt to ovs_nd_lla_opt to specify it's Source/Target Link-layer Address Option. Signed-off-by: Zongkai LI <zealokii@gmail.com> Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -233,33 +233,33 @@ odp_set_nd(struct dp_packet *packet, const struct ovs_key_nd *key,
|
||||
const struct ovs_key_nd *mask)
|
||||
{
|
||||
const struct ovs_nd_msg *ns = dp_packet_l4(packet);
|
||||
const struct ovs_nd_opt *nd_opt = dp_packet_get_nd_payload(packet);
|
||||
const struct ovs_nd_lla_opt *lla_opt = dp_packet_get_nd_payload(packet);
|
||||
|
||||
if (OVS_LIKELY(ns && nd_opt)) {
|
||||
if (OVS_LIKELY(ns && lla_opt)) {
|
||||
int bytes_remain = dp_packet_l4_size(packet) - sizeof(*ns);
|
||||
struct in6_addr tgt_buf;
|
||||
struct eth_addr sll_buf = eth_addr_zero;
|
||||
struct eth_addr tll_buf = eth_addr_zero;
|
||||
|
||||
while (bytes_remain >= ND_OPT_LEN && nd_opt->nd_opt_len != 0) {
|
||||
if (nd_opt->nd_opt_type == ND_OPT_SOURCE_LINKADDR
|
||||
&& nd_opt->nd_opt_len == 1) {
|
||||
sll_buf = nd_opt->nd_opt_mac;
|
||||
while (bytes_remain >= ND_LLA_OPT_LEN && lla_opt->len != 0) {
|
||||
if (lla_opt->type == ND_OPT_SOURCE_LINKADDR
|
||||
&& lla_opt->len == 1) {
|
||||
sll_buf = lla_opt->mac;
|
||||
ether_addr_copy_masked(&sll_buf, key->nd_sll, mask->nd_sll);
|
||||
|
||||
/* A packet can only contain one SLL or TLL option */
|
||||
break;
|
||||
} else if (nd_opt->nd_opt_type == ND_OPT_TARGET_LINKADDR
|
||||
&& nd_opt->nd_opt_len == 1) {
|
||||
tll_buf = nd_opt->nd_opt_mac;
|
||||
} else if (lla_opt->type == ND_OPT_TARGET_LINKADDR
|
||||
&& lla_opt->len == 1) {
|
||||
tll_buf = lla_opt->mac;
|
||||
ether_addr_copy_masked(&tll_buf, key->nd_tll, mask->nd_tll);
|
||||
|
||||
/* A packet can only contain one SLL or TLL option */
|
||||
break;
|
||||
}
|
||||
|
||||
nd_opt += nd_opt->nd_opt_len;
|
||||
bytes_remain -= nd_opt->nd_opt_len * ND_OPT_LEN;
|
||||
lla_opt += lla_opt->len;
|
||||
bytes_remain -= lla_opt->len * ND_LLA_OPT_LEN;
|
||||
}
|
||||
|
||||
packet_set_nd(packet,
|
||||
|
Reference in New Issue
Block a user