]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #2517 from pguibert6WIND/flowspec_other_options
authorRuss White <russ@riw.us>
Fri, 29 Jun 2018 17:45:44 +0000 (13:45 -0400)
committerGitHub <noreply@github.com>
Fri, 29 Jun 2018 17:45:44 +0000 (13:45 -0400)
Flowspec support other options

1  2 
zebra/zapi_msg.c

diff --combined zebra/zapi_msg.c
index 6946c33accce3c11fcf06f75406f8f1e064c915f,32165ae7892866504c183c0b627ca9b9ceb306b1..6e0d86d668eeb5d251df638bd9f6fb17383841f8
@@@ -521,7 -521,6 +521,7 @@@ int zsend_redistribute_route(int cmd, s
        struct zapi_nexthop *api_nh;
        struct nexthop *nexthop;
        int count = 0;
 +      afi_t afi;
  
        memset(&api, 0, sizeof(api));
        api.vrf_id = re->vrf_id;
        api.instance = re->instance;
        api.flags = re->flags;
  
 +      afi = family2afi(p->family);
 +      switch (afi) {
 +      case AFI_IP:
 +              if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD)
 +                      client->redist_v4_add_cnt++;
 +              else
 +                      client->redist_v4_del_cnt++;
 +              break;
 +      case AFI_IP6:
 +              if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD)
 +                      client->redist_v6_add_cnt++;
 +              else
 +                      client->redist_v6_del_cnt++;
 +              break;
 +      default:
 +              break;
 +      }
 +
        /* Prefix. */
        api.prefix = *p;
        if (src_p) {
@@@ -2915,9 -2896,9 +2915,9 @@@ static inline void zread_ipset_entry(ZA
  
                if (!is_default_prefix(&zpi.dst))
                        zpi.filter_bm |= PBR_FILTER_DST_IP;
-               if (zpi.dst_port_min != 0)
+               if (zpi.dst_port_min != 0 || zpi.proto == IPPROTO_ICMP)
                        zpi.filter_bm |= PBR_FILTER_DST_PORT;
-               if (zpi.src_port_min != 0)
+               if (zpi.src_port_min != 0 || zpi.proto == IPPROTO_ICMP)
                        zpi.filter_bm |= PBR_FILTER_SRC_PORT;
                if (zpi.dst_port_max != 0)
                        zpi.filter_bm |= PBR_FILTER_DST_PORT_RANGE;
@@@ -2957,6 -2938,12 +2957,12 @@@ static inline void zread_iptable(ZAPI_H
        STREAM_GETL(s, zpi.action);
        STREAM_GETL(s, zpi.fwmark);
        STREAM_GET(&zpi.ipset_name, s, ZEBRA_IPSET_NAME_SIZE);
+       STREAM_GETW(s, zpi.pkt_len_min);
+       STREAM_GETW(s, zpi.pkt_len_max);
+       STREAM_GETW(s, zpi.tcp_flags);
+       STREAM_GETW(s, zpi.tcp_mask_flags);
+       STREAM_GETC(s, zpi.dscp_value);
+       STREAM_GETC(s, zpi.fragment);
        STREAM_GETL(s, zpi.nb_interface);
        zebra_pbr_iptable_update_interfacelist(s, &zpi);