From: Nikolay Aleksandrov Date: Mon, 31 Oct 2016 12:21:03 +0000 (+0100) Subject: net: pim: add a helper to check for IPv4 all pim routers address X-Git-Tag: v4.14-rc1~1973^2~364^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20bb6ce9879e19eee7539329eaa2408d12b00306;p=platform%2Fkernel%2Flinux-rpi.git net: pim: add a helper to check for IPv4 all pim routers address Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller --- diff --git a/include/linux/pim.h b/include/linux/pim.h index 354235a..1b6c0db 100644 --- a/include/linux/pim.h +++ b/include/linux/pim.h @@ -57,4 +57,10 @@ static inline u8 pim_hdr_type(const struct pimhdr *pimhdr) { return pimhdr->type & 0xf; } + +/* check if the address is 224.0.0.13, RFC7761 sec 4.3.1 */ +static inline bool pim_ipv4_all_pim_routers(__be32 addr) +{ + return addr == htonl(0xE000000D); +} #endif