mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-26 13:10:34 +01:00
ndisc: add comment and static assert for struct sizes for ndisc packet layout
Obviously, there is no change in behavior. It's just an assertion.
(cherry picked from commit 96d7ddc865)
This commit is contained in:
parent
ec0fc593fa
commit
dc0d4ec817
1 changed files with 16 additions and 0 deletions
|
|
@ -333,7 +333,12 @@ _ndp_msg_add_option(struct ndp_msg *msg, int len)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* "Recursive DNS Server Option" at https://tools.ietf.org/html/rfc8106#section-5.1 */
|
||||
|
||||
#define NM_ND_OPT_RDNSS 25
|
||||
|
||||
typedef struct {
|
||||
struct nd_opt_hdr header;
|
||||
uint16_t reserved;
|
||||
|
|
@ -341,7 +346,14 @@ typedef struct {
|
|||
struct in6_addr addrs[0];
|
||||
} NMLndpRdnssOption;
|
||||
|
||||
G_STATIC_ASSERT(sizeof(NMLndpRdnssOption) == 8u);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* "DNS Search List Option" at https://tools.ietf.org/html/rfc8106#section-5.2 */
|
||||
|
||||
#define NM_ND_OPT_DNSSL 31
|
||||
|
||||
typedef struct {
|
||||
struct nd_opt_hdr header;
|
||||
uint16_t reserved;
|
||||
|
|
@ -349,6 +361,10 @@ typedef struct {
|
|||
char search_list[0];
|
||||
} NMLndpDnsslOption;
|
||||
|
||||
G_STATIC_ASSERT(sizeof(NMLndpDnsslOption) == 8u);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static gboolean
|
||||
send_ra(NMNDisc *ndisc, GError **error)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue