--- zzzz-none-000/linux-4.9.279/net/ipv6/datagram.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/ipv6/datagram.c 2023-02-08 10:58:16.000000000 +0000 @@ -11,6 +11,11 @@ * 2 of the License, or (at your option) any later version. */ +/* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + #include #include #include @@ -610,7 +615,20 @@ struct ipv6_pinfo *np = inet6_sk(sk); struct inet6_skb_parm *opt = IP6CB(skb); unsigned char *nh = skb_network_header(skb); +#ifdef CONFIG_TI_IP_PKTINFO_SOCKOPT + if (np->rxopt.bits.ti_rxinfo) { + struct ti_pktinfo info; + struct ethhdr *ehdr; +#ifdef CONFIG_TI_META_DATA + info.ifcpe_side = skb->ti_meta_info; + skb->ti_meta_info=0; +#endif + ehdr = eth_hdr(skb); + memcpy( info.mac_addr, ehdr->h_source, sizeof(info.mac_addr)); + put_cmsg(msg, SOL_IPV6, TI_IPV6_PKTINFO, sizeof(info), &info); + } +#endif if (np->rxopt.bits.rxhlim) { int hlim = ipv6_hdr(skb)->hop_limit; put_cmsg(msg, SOL_IPV6, IPV6_HOPLIMIT, sizeof(hlim), &hlim);