diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lockd/lockd.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index dae22cb4c38d..80a0a2cff2b8 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -68,6 +68,14 @@ struct nlm_host { | |||
68 | char *h_addrbuf; /* address eyecatcher */ | 68 | char *h_addrbuf; /* address eyecatcher */ |
69 | }; | 69 | }; |
70 | 70 | ||
71 | /* | ||
72 | * The largest string sm_addrbuf should hold is a full-size IPv6 address | ||
73 | * (no "::" anywhere) with a scope ID. The buffer size is computed to | ||
74 | * hold eight groups of colon-separated four-hex-digit numbers, a | ||
75 | * percent sign, a scope id (at most 32 bits, in decimal), and NUL. | ||
76 | */ | ||
77 | #define NSM_ADDRBUF ((8 * 4 + 7) + (1 + 10) + 1) | ||
78 | |||
71 | struct nsm_handle { | 79 | struct nsm_handle { |
72 | struct list_head sm_link; | 80 | struct list_head sm_link; |
73 | atomic_t sm_count; | 81 | atomic_t sm_count; |
@@ -76,7 +84,7 @@ struct nsm_handle { | |||
76 | size_t sm_addrlen; | 84 | size_t sm_addrlen; |
77 | unsigned int sm_monitored : 1, | 85 | unsigned int sm_monitored : 1, |
78 | sm_sticky : 1; /* don't unmonitor */ | 86 | sm_sticky : 1; /* don't unmonitor */ |
79 | char sm_addrbuf[48]; /* address eyecatcher */ | 87 | char sm_addrbuf[NSM_ADDRBUF]; |
80 | }; | 88 | }; |
81 | 89 | ||
82 | /* | 90 | /* |