mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 10:32:00 +00:00
Merge pull request #11151 from opensourcerouting/pim-various-20220506
pimd, pim6d: fix various smaller issues
This commit is contained in:
commit
daa97042a2
@ -63,7 +63,8 @@ typedef uint32_t if_mask;
|
||||
#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */
|
||||
|
||||
typedef struct if_set {
|
||||
if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
|
||||
/* __KERNEL_DIV_ROUND_UP() */
|
||||
if_mask ifs_bits[(IF_SETSIZE + NIFBITS - 1) / NIFBITS];
|
||||
} if_set;
|
||||
|
||||
#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "pim_nb.h"
|
||||
#include "pim_addr.h"
|
||||
#include "pim_nht.h"
|
||||
#include "pim_bsm.h"
|
||||
|
||||
|
||||
#ifndef VTYSH_EXTRACT_PL
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "lib/network.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_mroute.h"
|
||||
#include "pim_oil.h"
|
||||
#include "pim_str.h"
|
||||
@ -167,10 +168,12 @@ int pim_mroute_msg(struct pim_instance *pim, const char *buf,
|
||||
msg);
|
||||
case MRT6MSG_WHOLEPKT:
|
||||
return pim_mroute_msg_wholepkt(pim->mroute_socket, ifp,
|
||||
(const char *)msg);
|
||||
(const char *)msg,
|
||||
buf_size);
|
||||
case MRT6MSG_WRMIFWHOLE:
|
||||
return pim_mroute_msg_wrvifwhole(
|
||||
pim->mroute_socket, ifp, (const char *)msg);
|
||||
return pim_mroute_msg_wrvifwhole(pim->mroute_socket,
|
||||
ifp, (const char *)msg,
|
||||
buf_size);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "pim_pim.h"
|
||||
#include "pim_register.h"
|
||||
#include "pim_cmd.h"
|
||||
#include "pim_bsm.h"
|
||||
|
||||
/*
|
||||
* NH lookup / NHT
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "if.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_tlv.h"
|
||||
#include "pim_msg.h"
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "lib/linklist.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_vty.h"
|
||||
#include "lib/northbound_cli.h"
|
||||
#include "pim_errors.h"
|
||||
|
@ -20,6 +20,12 @@
|
||||
#ifndef PIM_CMD_COMMON_H
|
||||
#define PIM_CMD_COMMON_H
|
||||
|
||||
struct pim_upstream;
|
||||
struct pim_instance;
|
||||
|
||||
/* duplicated from pim_instance.h - needed to avoid dependency mess */
|
||||
struct pim_instance *pim_get_pim_instance(vrf_id_t vrf_id);
|
||||
|
||||
const char *pim_cli_get_vrf_name(struct vty *vty);
|
||||
int pim_process_join_prune_cmd(struct vty *vty, const char *jpi_str);
|
||||
int pim_process_no_join_prune_cmd(struct vty *vty);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "if.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_pim.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_tlv.h"
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
#include "pim_igmp.h"
|
||||
#include "pim_upstream.h"
|
||||
#include "pim_instance.h"
|
||||
#include "bfd.h"
|
||||
#include "pim_str.h"
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "prefix.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_ifchannel.h"
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_igmp.h"
|
||||
#include "pim_igmpv2.h"
|
||||
#include "pim_igmpv3.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <zebra.h>
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_util.h"
|
||||
#include "pim_sock.h"
|
||||
#include "pim_rp.h"
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "zebra.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_igmp.h"
|
||||
#include "pim_igmpv2.h"
|
||||
#include "pim_igmpv3.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_igmp.h"
|
||||
#include "pim_igmpv3.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_ssm.h"
|
||||
#include "pim_rpf.h"
|
||||
#include "pim_rp.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "plist.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_tlv.h"
|
||||
#include "pim_msg.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "if.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_msg.h"
|
||||
#include "pim_jp_agg.h"
|
||||
#include "pim_join.h"
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef __PIM_JP_AGG_H__
|
||||
#define __PIM_JP_AGG_H__
|
||||
|
||||
#include "pim_rpf.h"
|
||||
|
||||
struct pim_jp_sources {
|
||||
struct pim_upstream *up;
|
||||
int is_join;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "plist.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_macro.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_ifchannel.h"
|
||||
|
@ -137,7 +137,8 @@ int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf)
|
||||
int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
struct pim_interface *pim_ifp;
|
||||
pim_sgaddr sg;
|
||||
@ -229,7 +230,7 @@ int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf)
|
||||
}
|
||||
|
||||
pim_register_send((uint8_t *)buf + sizeof(ipv_hdr),
|
||||
ntohs(IPV_LEN(ip_hdr)) - sizeof(ipv_hdr),
|
||||
len - sizeof(ipv_hdr),
|
||||
pim_ifp->primary_address, rpg, 0, up);
|
||||
}
|
||||
return 0;
|
||||
@ -336,7 +337,8 @@ int pim_mroute_msg_wrongvif(int fd, struct interface *ifp, const kernmsg *msg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf)
|
||||
int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
const ipv_hdr *ip_hdr = (const ipv_hdr *)buf;
|
||||
struct pim_interface *pim_ifp;
|
||||
@ -463,7 +465,7 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf)
|
||||
pim_upstream_keep_alive_timer_start(
|
||||
up, pim_ifp->pim->keep_alive_time);
|
||||
pim_upstream_inherited_olist(pim_ifp->pim, up);
|
||||
pim_mroute_msg_wholepkt(fd, ifp, buf);
|
||||
pim_mroute_msg_wholepkt(fd, ifp, buf, len);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -490,7 +492,7 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf)
|
||||
pim_upstream_mroute_add(up->channel_oil, __func__);
|
||||
|
||||
// Send the packet to the RP
|
||||
pim_mroute_msg_wholepkt(fd, ifp, buf);
|
||||
pim_mroute_msg_wholepkt(fd, ifp, buf, len);
|
||||
} else {
|
||||
up = pim_upstream_add(pim_ifp->pim, &sg, ifp,
|
||||
PIM_UPSTREAM_FLAG_MASK_SRC_NOCACHE,
|
||||
|
@ -136,6 +136,7 @@ typedef struct sioc_sg_req6 pim_sioc_sg_req;
|
||||
*/
|
||||
|
||||
struct channel_oil;
|
||||
struct pim_instance;
|
||||
|
||||
int pim_mroute_socket_enable(struct pim_instance *pim);
|
||||
int pim_mroute_socket_disable(struct pim_instance *pim);
|
||||
@ -158,8 +159,10 @@ bool pim_mroute_allow_iif_in_oil(struct channel_oil *c_oil,
|
||||
int pim_mroute_msg(struct pim_instance *pim, const char *buf, size_t buf_size,
|
||||
ifindex_t ifindex);
|
||||
int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg);
|
||||
int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf);
|
||||
int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf,
|
||||
size_t len);
|
||||
int pim_mroute_msg_wrongvif(int fd, struct interface *ifp, const kernmsg *msg);
|
||||
int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf);
|
||||
int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf,
|
||||
size_t len);
|
||||
int pim_mroute_set(struct pim_instance *pim, int enable);
|
||||
#endif /* PIM_MROUTE_H */
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "lib/network.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_mroute.h"
|
||||
#include "pim_oil.h"
|
||||
#include "pim_str.h"
|
||||
@ -226,10 +227,12 @@ int pim_mroute_msg(struct pim_instance *pim, const char *buf,
|
||||
msg);
|
||||
case IGMPMSG_WHOLEPKT:
|
||||
return pim_mroute_msg_wholepkt(pim->mroute_socket, ifp,
|
||||
(const char *)msg);
|
||||
(const char *)msg,
|
||||
buf_size);
|
||||
case IGMPMSG_WRVIFWHOLE:
|
||||
return pim_mroute_msg_wrvifwhole(
|
||||
pim->mroute_socket, ifp, (const char *)msg);
|
||||
return pim_mroute_msg_wrvifwhole(pim->mroute_socket,
|
||||
ifp, (const char *)msg,
|
||||
buf_size);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_memory.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_rp.h"
|
||||
#include "pim_str.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <lib/lib_errors.h>
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_errors.h"
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <lib/lib_errors.h>
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_sock.h"
|
||||
#include "pim_errors.h"
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "plist.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_vty.h"
|
||||
#include "pim_pim.h"
|
||||
#include "pim_msg.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_neighbor.h"
|
||||
#include "pim_time.h"
|
||||
#include "pim_str.h"
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pimd/pim_nht.h"
|
||||
#include "pim_instance.h"
|
||||
#include "log.h"
|
||||
#include "pim_time.h"
|
||||
#include "pim_oil.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "network.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_pim.h"
|
||||
#include "pim_time.h"
|
||||
#include "pim_iface.h"
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_vty.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_iface.h"
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "jhash.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_rpf.h"
|
||||
#include "pim_pim.h"
|
||||
#include "pim_str.h"
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <zebra.h>
|
||||
#include "pim_str.h"
|
||||
|
||||
struct pim_instance;
|
||||
|
||||
/*
|
||||
RFC 4601:
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "network.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_mroute.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_sock.h"
|
||||
|
@ -35,6 +35,8 @@
|
||||
#define PIM_SOCK_ERR_NAME (-10) /* Socket name (getsockname) */
|
||||
#define PIM_SOCK_ERR_BIND (-11) /* Can't bind to interface */
|
||||
|
||||
struct pim_instance;
|
||||
|
||||
int pim_socket_bind(int fd, struct interface *ifp);
|
||||
void pim_socket_ip_hdr(int fd);
|
||||
int pim_socket_raw(int protocol);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <lib/lib_errors.h>
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_ssm.h"
|
||||
#include "pim_igmp.h"
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#define PIM_SSM_STANDARD_RANGE "232.0.0.0/8"
|
||||
|
||||
struct pim_instance;
|
||||
|
||||
/* SSM error codes */
|
||||
enum pim_ssm_err {
|
||||
PIM_SSM_ERR_NONE = 0,
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_ssmpingd.h"
|
||||
#include "pim_time.h"
|
||||
#include "pim_sock.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "linklist.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_oil.h"
|
||||
#include "pim_static.h"
|
||||
#include "pim_time.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <zebra.h>
|
||||
#include "pim_mroute.h"
|
||||
#include "pim_oil.h"
|
||||
#include "if.h"
|
||||
|
||||
struct static_route {
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "pim_tib.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_upstream.h"
|
||||
#include "pim_oil.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "if.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_int.h"
|
||||
#include "pim_tlv.h"
|
||||
#include "pim_str.h"
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "vty.h"
|
||||
|
||||
struct pim_instance;
|
||||
|
||||
int pim_debug_config_write(struct vty *vty);
|
||||
int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty);
|
||||
int pim_interface_config_write(struct vty *vty);
|
||||
|
@ -22,6 +22,8 @@
|
||||
#ifndef PIM_VXLAN_H
|
||||
#define PIM_VXLAN_H
|
||||
|
||||
#include "pim_instance.h"
|
||||
|
||||
/* global timer used for miscellaneous staggered processing */
|
||||
#define PIM_VXLAN_WORK_TIME 1
|
||||
/* number of SG entries processed at one shot */
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_iface.h"
|
||||
#include "pim_neighbor.h"
|
||||
#include "pim_pim.h"
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
#define PIM_NEXTHOP_LOOKUP_MAX (3) /* max. recursive route lookup */
|
||||
|
||||
struct channel_oil;
|
||||
|
||||
struct pim_zlookup_nexthop {
|
||||
vrf_id_t vrf_id;
|
||||
pim_addr nexthop_addr;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <lib/lib_errors.h>
|
||||
|
||||
#include "pimd.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_mlag.h"
|
||||
#include "pim_zebra.h"
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "plist.h"
|
||||
|
||||
#include "pim_addr.h"
|
||||
#include "pim_instance.h"
|
||||
#include "pim_str.h"
|
||||
#include "pim_memory.h"
|
||||
#include "pim_assert.h"
|
||||
|
Loading…
Reference in New Issue
Block a user