Pre-revert nonmergeable changes

Revert "ospf6d: fix decimal area ID cli"
commit a27cb3cfe9

Revert "bgpd: add back unicast option to 'address-family vpnv(4&6)' Issue #459"
commit 399598bf6b

Revert "Fix the memory leak"
commit d8d58e9839

Revert "zebra: 'no ip route 4.1.1.19 255.255.255.255 99' is ambiguous"
commit 83f3561935

Revert "ospf6d: Allow unconfig of unknown lsa's"
commit 5b0747d71d

Revert "Fix the "Dead assignment" of clang SA."
commit 3a6570a1f1

Revert "snapcraft: Improve README.usage.md based on feedback received"
commit 2a3a819a9c

Revert "zebra: stop deregistering static nexthops unless removing the static"
commit 1dac3a9619

All of these changes do not apply on stable/3.0 due to either CLI
changes or another fix already being present.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-05-18 11:41:01 +02:00
parent 921c2f1ef7
commit b2b6f8f33c
10 changed files with 42 additions and 108 deletions

View File

@ -6147,13 +6147,6 @@ DEFUN (address_family_vpnv4,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
ALIAS (address_family_vpnv4,
address_family_vpnv4_unicast_cmd,
"address-family vpnv4 unicast",
"Enter Address Family command mode\n"
"Address family\n"
"Address Family modifier\n")
DEFUN (address_family_vpnv6, DEFUN (address_family_vpnv6,
address_family_vpnv6_cmd, address_family_vpnv6_cmd,
"address-family vpnv6", "address-family vpnv6",
@ -6164,13 +6157,6 @@ DEFUN (address_family_vpnv6,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
ALIAS (address_family_vpnv6,
address_family_vpnv6_unicast_cmd,
"address-family vpnv6 unicast",
"Enter Address Family command mode\n"
"Address family\n"
"Address Family modifier\n")
DEFUN (address_family_encap, DEFUN (address_family_encap,
address_family_encap_cmd, address_family_encap_cmd,
"address-family encap", "address-family encap",
@ -15173,9 +15159,7 @@ bgp_vty_init (void)
install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_ipv6_cmd);
install_element (BGP_NODE, &address_family_ipv6_safi_cmd); install_element (BGP_NODE, &address_family_ipv6_safi_cmd);
install_element (BGP_NODE, &address_family_vpnv4_cmd); install_element (BGP_NODE, &address_family_vpnv4_cmd);
install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd);
install_element (BGP_NODE, &address_family_vpnv6_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd);
install_element (BGP_NODE, &address_family_vpnv6_unicast_cmd);
install_element (BGP_NODE, &address_family_encap_cmd); install_element (BGP_NODE, &address_family_encap_cmd);
install_element (BGP_NODE, &address_family_encapv4_cmd); install_element (BGP_NODE, &address_family_encapv4_cmd);
install_element (BGP_NODE, &address_family_encapv6_cmd); install_element (BGP_NODE, &address_family_encapv6_cmd);

View File

@ -177,9 +177,6 @@ csv_decode_record(csv_record_t *rec)
field = strpbrk(curr, ","); field = strpbrk(curr, ",");
} }
field = strstr(curr, "\n"); field = strstr(curr, "\n");
if (!field) {
return;
}
fld = malloc(sizeof(csv_field_t)); fld = malloc(sizeof(csv_field_t));
if (field && fld) { if (field && fld) {
fld->field = curr; fld->field = curr;
@ -242,10 +239,6 @@ csv_encode (csv_t *csv,
rec = malloc(sizeof(csv_record_t)); rec = malloc(sizeof(csv_record_t));
if (!rec) { if (!rec) {
log_error("record malloc failed\n"); log_error("record malloc failed\n");
if (!buf) {
free(str);
}
va_end(list);
return (NULL); return (NULL);
} }
csv_init_record(rec); csv_init_record(rec);

View File

@ -406,11 +406,26 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa)
} }
#define OSPF6_CMD_AREA_LOOKUP(str, oa) \
{ \
u_int32_t area_id = 0; \
if (inet_pton (AF_INET, str, &area_id) != 1) \
{ \
vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \
return CMD_SUCCESS; \
} \
oa = ospf6_area_lookup (area_id, ospf6); \
if (oa == NULL) \
{ \
vty_out (vty, "No such Area: %s%s", str, VNL); \
return CMD_SUCCESS; \
} \
}
#define OSPF6_CMD_AREA_GET(str, oa) \ #define OSPF6_CMD_AREA_GET(str, oa) \
{ \ { \
char *ep; \ u_int32_t area_id = 0; \
u_int32_t area_id = htonl (strtol(str, &ep, 10)); \ if (inet_pton (AF_INET, str, &area_id) != 1) \
if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \
{ \ { \
vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \
return CMD_SUCCESS; \ return CMD_SUCCESS; \

View File

@ -872,17 +872,7 @@ ALIAS (debug_ospf6_lsa_type,
DEBUG_STR DEBUG_STR
OSPF6_STR OSPF6_STR
"Debug Link State Advertisements (LSAs)\n" "Debug Link State Advertisements (LSAs)\n"
"Router LSA's\n" "Specify LS type as Hexadecimal\n"
"Network LSA's\n"
"Inter-Prefix LSA's\n"
"Inter-Router LSA's\n"
"AS-External LSA's\n"
"Link LSA's\n"
"Intra-Prefix LSA's\n"
"Unknown LSA's\n"
"Originate\n"
"Examine\n"
"Flooding\n"
) )
DEFUN (no_debug_ospf6_lsa_type, DEFUN (no_debug_ospf6_lsa_type,
@ -938,22 +928,12 @@ DEFUN (no_debug_ospf6_lsa_type,
ALIAS (no_debug_ospf6_lsa_type, ALIAS (no_debug_ospf6_lsa_type,
no_debug_ospf6_lsa_hex_detail_cmd, no_debug_ospf6_lsa_hex_detail_cmd,
"no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown) (originate|examine|flooding)", "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix) (originate|examine|flooding)",
NO_STR NO_STR
DEBUG_STR DEBUG_STR
OSPF6_STR OSPF6_STR
"Debug Link State Advertisements (LSAs)\n" "Debug Link State Advertisements (LSAs)\n"
"Router LSA's\n" "Specify LS type as Hexadecimal\n"
"Network LSA's\n"
"Inter-Prefix LSA's\n"
"Inter-Router LSA's\n"
"AS-External LSA's\n"
"Link LSA's\n"
"Intra-Prefix LSA's\n"
"Unknown LSA's\n"
"Originate\n"
"Examine\n"
"Flooding\n"
) )
void void

View File

@ -2459,7 +2459,7 @@ ospf_apiserver_clients_notify_nsm_change (struct ospf_neighbor *nbr)
{ {
struct msg *msg; struct msg *msg;
struct in_addr ifaddr = { .s_addr = 0L }; struct in_addr ifaddr = { .s_addr = 0L };
struct in_addr nbraddr; struct in_addr nbraddr = { .s_addr = 0L };
assert (nbr); assert (nbr);

View File

@ -6763,6 +6763,7 @@ DEFUN (no_ip_ospf_cost,
int ret; int ret;
struct ospf_if_params *params; struct ospf_if_params *params;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
if (argc == 1) if (argc == 1)
@ -6831,6 +6832,7 @@ DEFUN (no_ip_ospf_cost2,
int ret; int ret;
struct ospf_if_params *params; struct ospf_if_params *params;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
/* According to the semantics we are mimicking "no ip ospf cost N" is /* According to the semantics we are mimicking "no ip ospf cost N" is
@ -7070,6 +7072,7 @@ DEFUN (no_ip_ospf_dead_interval,
struct ospf_interface *oi; struct ospf_interface *oi;
struct route_node *rn; struct route_node *rn;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
if (argc == 2) if (argc == 2)
@ -7244,6 +7247,7 @@ DEFUN (no_ip_ospf_hello_interval,
int ret; int ret;
struct ospf_if_params *params; struct ospf_if_params *params;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
if (argc == 2) if (argc == 2)
@ -7521,6 +7525,7 @@ DEFUN (no_ip_ospf_priority,
int ret; int ret;
struct ospf_if_params *params; struct ospf_if_params *params;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
if (argc == 2) if (argc == 2)
@ -7667,6 +7672,7 @@ DEFUN (no_ip_ospf_retransmit_interval,
struct ospf_if_params *params; struct ospf_if_params *params;
int addr_index; int addr_index;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
if (argc >= 1) if (argc >= 1)
@ -7738,6 +7744,7 @@ DEFUN (no_ip_ospf_retransmit_interval_sec,
struct interface *ifp = vty->index; struct interface *ifp = vty->index;
struct ospf_if_params *params; struct ospf_if_params *params;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
UNSET_IF_PARAM (params, retransmit_interval); UNSET_IF_PARAM (params, retransmit_interval);
@ -7822,6 +7829,7 @@ DEFUN (no_ip_ospf_transmit_delay,
struct ospf_if_params *params; struct ospf_if_params *params;
int addr_index; int addr_index;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
if (argc >= 1) if (argc >= 1)
@ -7894,6 +7902,7 @@ DEFUN (no_ip_ospf_transmit_delay_sec,
struct interface *ifp = vty->index; struct interface *ifp = vty->index;
struct ospf_if_params *params; struct ospf_if_params *params;
ifp = vty->index;
params = IF_DEF_PARAMS (ifp); params = IF_DEF_PARAMS (ifp);
UNSET_IF_PARAM (params, transmit_delay); UNSET_IF_PARAM (params, transmit_delay);

View File

@ -160,8 +160,8 @@ pim_register_recv (struct interface *ifp,
int sentRegisterStop = 0; int sentRegisterStop = 0;
struct ip *ip_hdr; struct ip *ip_hdr;
//size_t hlen; //size_t hlen;
struct in_addr group; struct in_addr group = { .s_addr = 0 };
struct in_addr source; struct in_addr source = { .s_addr = 0 };
//uint8_t *msg; //uint8_t *msg;
uint32_t *bits; uint32_t *bits;

View File

@ -3,7 +3,7 @@ Using the FRRouting Snap
After installing the Snap, the priviledged plug need to be connected: After installing the Snap, the priviledged plug need to be connected:
snap connect frr:network-control core:network-control snap connect frr:network-control ubuntu-core:network-control
Enabling/Disabling FRRouting Daemons Enabling/Disabling FRRouting Daemons
------------------------------------------- -------------------------------------------
@ -53,74 +53,25 @@ depend on them). These are mainly intended to debug the Snap
- `frr.ldpd-debug`: - `frr.ldpd-debug`:
Starts ldpd daemon in foreground Starts ldpd daemon in foreground
MPLS (LDP)
----------
The MPLS forwarding requires a Linux Kernel version 4.5 or newer and
specific MPLS kernel modules loaded. It will be auto-detected by
FRR. You can check the detected setup with the `show mpls status`
command from within `frr.vtysh`
The following kernel modules `mpls-router` and `mpls-iptunnel`
need to be loaded. On Ubuntu 16.04, this can be done by editing
'/etc/modules-load.d/modules.conf' and add the following lines:
# Load MPLS Kernel Modules
mpls-router
mpls-iptunnel
For other distributions, please check the documentation on loading
modules. You need to either reboot or use `modprobe` to manually load
the modules as well before MPLS will be available.
In addition to this, the MPLS Label-Processing needs to be enabled
with `sysctl` on the required interfaces. Assuming the interfaces
are named `eth0`, `eth1` and `eth2`, then the additional lines in
`/etc/sysctl.conf` will enable it on a Ubuntu 16.04 system:
# Enable MPLS Label processing on all interfaces
net.mpls.conf.eth0.input=1
net.mpls.conf.eth1.input=1
net.mpls.conf.eth2.input=1
net.mpls.platform_labels=100000
These settings require either a reboot or a manual configuration with
`sysctl` as well.
FAQ FAQ
--- ---
- frr.vtysh displays `--MORE--` on long output. How to suppress this? - frr.vtysh displays `--MORE--` on long output. How to suppress this?
- Define `VTYSH_PAGER` to `cat` (default is `more`). (Ie add - Define `VTYSH_PAGER` to `cat` (default is `more`). (Ie add
`export VTYSH_PAGER=cat` to the end of your `.profile`) `export VTYSH_PAGER=cat` to the end of your `.profile`)
- ospfd / ospf6d are not running after installation
- Installing a new snap starts the daemons, but at this time they
may not have the required priviledged access. Make sure you
issue the `snap connect` command as given above (can be verified
with `snap interfaces`) and **THEN** restart the daemons (or
reboot the system).
This is a limitation of any snap package at this time which
requires priviledged interfaces (ie to manipulate routing tables)
Sourcecode available Sourcecode available
==================== ====================
The source for this SNAP is available as part of the FRRouting The source for this SNAP is available as part of the FRRouting
Source Code Distribution under `GPLv2 or later` Source Code Distribution.
<https://github.com/frrouting/frr.git> https://github.com/frrouting/frr.git
Instructions for rebuilding the snap are in `snapcraft/README.snap_build.md` Instructions for rebuilding the snap are in `README.snap_build.md`
*Please checkout the desired branch before following the instructions
as they may have changed between versions of FRR*
Official Webpage for FRR
========================
Official webpage for FRR is at <https://www.frrouting.org/>
Feedback welcome Feedback welcome
================ ================
Please send Feedback about this snap to Martin Winter at Please send Feedback about this snap to Martin Winter at
`mwinter@opensourcerouting.org` `mwinter@opensourcerouting.org`

View File

@ -472,7 +472,7 @@ DEFUN (no_ip_route_tag_distance_label,
DEFUN (no_ip_route_mask_distance_label, DEFUN (no_ip_route_mask_distance_label,
no_ip_route_mask_distance_label_cmd, no_ip_route_mask_distance_label_cmd,
"no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255> label WORD", "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>",
NO_STR NO_STR
IP_STR IP_STR
"Establish static routes\n" "Establish static routes\n"
@ -486,7 +486,7 @@ DEFUN (no_ip_route_mask_distance_label,
"One or more labels separated by '/'\n") "One or more labels separated by '/'\n")
{ {
return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL,
argv[3], NULL, argv[4]); argv[3], NULL, argv[5]);
} }
DEFUN (no_ip_route_mask_tag_distance_label, DEFUN (no_ip_route_mask_tag_distance_label,

View File

@ -366,6 +366,7 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
if (set) if (set)
{ {
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE); UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE);
zebra_deregister_rnh_static_nexthops(rib->vrf_id, nexthop->resolved, top);
nexthops_free(nexthop->resolved); nexthops_free(nexthop->resolved);
nexthop->resolved = NULL; nexthop->resolved = NULL;
rib->nexthop_mtu = 0; rib->nexthop_mtu = 0;
@ -596,6 +597,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
if (set) if (set)
{ {
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE); UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE);
zebra_deregister_rnh_static_nexthops (rib->vrf_id, nexthop->resolved, top);
nexthops_free(nexthop->resolved); nexthops_free(nexthop->resolved);
nexthop->resolved = NULL; nexthop->resolved = NULL;
} }