On Fri, Aug 04, 2017 at 12:36:36PM +0000, Florian Obser wrote:
> We do have SO_TIMESTAMP since some time and there is other code in the
> kernel that uses it without the #ifdef guard.
> 
> OK?

OK bluhm@

> 
> diff --git netinet/ip_input.c netinet/ip_input.c
> index ee74eeadc4c..30fa3597fbb 100644
> --- netinet/ip_input.c
> +++ netinet/ip_input.c
> @@ -1711,7 +1711,6 @@ void
>  ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip,
>      struct mbuf *m)
>  {
> -#ifdef SO_TIMESTAMP
>       if (inp->inp_socket->so_options & SO_TIMESTAMP) {
>               struct timeval tv;
>  
> @@ -1721,7 +1720,7 @@ ip_savecontrol(struct inpcb *inp, struct mbuf **mp, 
> struct ip *ip,
>               if (*mp)
>                       mp = &(*mp)->m_next;
>       }
> -#endif
> +
>       if (inp->inp_flags & INP_RECVDSTADDR) {
>               *mp = sbcreatecontrol((caddr_t) &ip->ip_dst,
>                   sizeof(struct in_addr), IP_RECVDSTADDR, IPPROTO_IP);
> diff --git netinet6/ip6_input.c netinet6/ip6_input.c
> index ed8702fa71a..3da635a70ab 100644
> --- netinet6/ip6_input.c
> +++ netinet6/ip6_input.c
> @@ -942,7 +942,6 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, 
> struct mbuf **mp)
>  {
>       struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
>  
> -#ifdef SO_TIMESTAMP
>       if (in6p->inp_socket->so_options & SO_TIMESTAMP) {
>               struct timeval tv;
>  
> @@ -952,7 +951,6 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, 
> struct mbuf **mp)
>               if (*mp)
>                       mp = &(*mp)->m_next;
>       }
> -#endif
>  
>       /* RFC 2292 sec. 5 */
>       if ((in6p->inp_flags & IN6P_PKTINFO) != 0) {
> 
> 
> -- 
> I'm not entirely sure you are real.

  • SO_TIMESTAMP Florian Obser
    • Re: SO_TIMESTAMP Alexander Bluhm

Reply via email to