@@ -32,7 +32,6 @@ struct netkit {
32
32
struct netkit_link {
33
33
struct bpf_link link ;
34
34
struct net_device * dev ;
35
- u32 location ;
36
35
};
37
36
38
37
static __always_inline int
@@ -733,8 +732,8 @@ static void netkit_link_fdinfo(const struct bpf_link *link, struct seq_file *seq
733
732
734
733
seq_printf (seq , "ifindex:\t%u\n" , ifindex );
735
734
seq_printf (seq , "attach_type:\t%u (%s)\n" ,
736
- nkl -> location ,
737
- nkl -> location == BPF_NETKIT_PRIMARY ? "primary" : "peer" );
735
+ link -> attach_type ,
736
+ link -> attach_type == BPF_NETKIT_PRIMARY ? "primary" : "peer" );
738
737
}
739
738
740
739
static int netkit_link_fill_info (const struct bpf_link * link ,
@@ -749,7 +748,7 @@ static int netkit_link_fill_info(const struct bpf_link *link,
749
748
rtnl_unlock ();
750
749
751
750
info -> netkit .ifindex = ifindex ;
752
- info -> netkit .attach_type = nkl -> location ;
751
+ info -> netkit .attach_type = link -> attach_type ;
753
752
return 0 ;
754
753
}
755
754
@@ -776,7 +775,6 @@ static int netkit_link_init(struct netkit_link *nkl,
776
775
{
777
776
bpf_link_init (& nkl -> link , BPF_LINK_TYPE_NETKIT ,
778
777
& netkit_link_lops , prog , attr -> link_create .attach_type );
779
- nkl -> location = attr -> link_create .attach_type ;
780
778
nkl -> dev = dev ;
781
779
return bpf_link_prime (& nkl -> link , link_primer );
782
780
}
0 commit comments