On Sun, Jul 11, 2021 at 05:33:18AM +0300, Vitaliy Makkoveev wrote:
> This member is never set or used. Also I kept 'SENT_IP6' definition for
> prevent the potential break of third party software. Is it ok to
> redefine it to '0x0002'? At least openswan wants this [1].
> 
> 1. 
> https://github.com/xelerance/Openswan/blob/master/include/openswan/ipsec_encap.h#L20

I wouldn't worry about third party software. Those defines are within
#ifdef _KERNEL so everyone using those is doing it wrong anyway.

ok with SENT_IP6 changed to 0x0002.

> 
> Index: sys/netinet/ip_ipsp.h
> ===================================================================
> RCS file: /cvs/src/sys/netinet/ip_ipsp.h,v
> retrieving revision 1.200
> diff -u -p -r1.200 ip_ipsp.h
> --- sys/netinet/ip_ipsp.h     8 Jul 2021 21:07:19 -0000       1.200
> +++ sys/netinet/ip_ipsp.h     11 Jul 2021 02:25:17 -0000
> @@ -113,8 +113,6 @@ struct sockaddr_encap {
>                       u_int16_t       Sport;
>                       u_int16_t       Dport;
>               } Sip6;
> -
> -             struct ipsec_policy     *PolicyHead;    /* SENT_IPSP */
>       } Sen;
>  };
>  
> @@ -208,7 +206,6 @@ struct m_tag;
>  #define      sen_ip6_sport           Sen.Sip6.Sport
>  #define      sen_ip6_dport           Sen.Sip6.Dport
>  #define      sen_ip6_direction       Sen.Sip6.Direction
> -#define      sen_ipsp                Sen.PolicyHead
>  
>  /*
>   * The "type" is really part of the address as far as the routing
> @@ -219,7 +216,6 @@ struct m_tag;
>   */
>  
>  #define      SENT_IP4        0x0001          /* data is two struct in_addr */
> -#define      SENT_IPSP       0x0002          /* data as in IP4/6 plus SPI */
>  #define      SENT_IP6        0x0004
>  
>  #define      SENT_LEN        sizeof(struct sockaddr_encap)
> 

Reply via email to