<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi guys,</p>
    <p>I may be going blind or just dumb, but I could of sworn this
      worked like a year ago in v2.<br>
    </p>
    <p>I have a t_static4 table, with a static device route, I pipe this
      to my master4 table, then pipe my master4 table to RIP and only
      pick out the RTS_STATIC_DEVICE routes.<br>
    </p>
    <p>However the source is set to RTS_STATIC not RTS_STATIC_DEVICE? 
      enum(30)1</p>
    <p>Full config file attached. I tried to summarize it a bit below. I
      also attached a diagram.svg of the r1 setup below.<br>
    </p>
    <p>-N<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><tt>ipv4 table t_static4;</tt></p>
    <p><tt>protocol static static4 {</tt><tt><br>
      </tt><tt>        ipv4 {</tt><tt><br>
      </tt><tt>                table t_static4;</tt><tt><br>
      </tt><tt>                export none;</tt><tt><br>
      </tt><tt>                import all;</tt><tt><br>
      </tt><tt>        };</tt><tt><br>
      </tt><font color="#ff0606"><b><tt>        route 192.168.20.0/24
            via "eth1";</tt></b></font><tt><br>
      </tt><tt>};</tt></p>
    <p><tt>protocol pipe p_static4_to_master4 {</tt><tt><br>
      </tt><tt>        table t_static4;</tt><tt><br>
      </tt><tt>        peer table master4;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>        export all;</tt><tt><br>
      </tt><tt>        import none;</tt><tt><br>
      </tt><tt>};</tt><tt><br>
      </tt></p>
    <p><tt>ipv4 table t_rip4;</tt></p>
    <p><tt>filter f_rip_export4 {</tt><tt><br>
      </tt><tt>        # Redistribute static device routes</tt><tt><br>
      </tt><tt>        if (source = RTS_STATIC_DEVICE) then {</tt><tt><br>
      </tt><tt>                accept;</tt><tt><br>
      </tt><tt>        }</tt><tt><br>
      </tt><tt>        # Redistribute RIP routes</tt><tt><br>
      </tt><tt>        if (source = RTS_RIP) then {</tt><tt><br>
      </tt><tt>                accept;</tt><tt><br>
      </tt><tt>        }</tt><tt><br>
      </tt><tt>        reject;</tt><tt><br>
      </tt><tt>};</tt><tt><br>
      </tt></p>
    <p><tt>filter f_rip_import4 {</tt><tt><br>
      </tt><tt>        # Import all RIP routes by default</tt><tt><br>
      </tt><tt>        accept;</tt><tt><br>
      </tt><tt>};</tt></p>
    <p><tt>filter f_rip_master4_export {</tt><tt><br>
      </tt><tt>        # Do not export default route to master</tt><tt><br>
      </tt><tt>        if (net = 0.0.0.0/0) then {</tt><tt><br>
      </tt><tt>                reject;</tt><tt><br>
      </tt><tt>        }</tt><tt><br>
      </tt><tt>        # Only export RIP routes o the master table</tt><tt><br>
      </tt><tt>        if (source = RTS_RIP) then {</tt><tt><br>
      </tt><tt>                accept;</tt><tt><br>
      </tt><tt>        }</tt><tt><br>
      </tt><tt>        # Reject everything else;</tt><tt><br>
      </tt><tt>        reject;</tt><tt><br>
      </tt><tt>};</tt></p>
    <p><tt>filter f_rip_master4_import {</tt><tt><br>
      </tt><tt>        print "rip to master";</tt><tt><br>
      </tt><tt>        print source;</tt><tt><br>
      </tt><b><font color="#ff0606"><tt>        # Import static device
            routes into RIP (redistribute static_device)</tt><tt><br>
          </tt><tt>        if (source = RTS_STATIC_DEVICE) then {</tt><tt><br>
          </tt><tt>                accept;</tt><tt><br>
          </tt><tt>        }</tt></font></b><tt><br>
      </tt><tt>        reject;</tt><tt><br>
      </tt><tt>};</tt><tt><br>
      </tt></p>
    <p><tt>protocol rip rip4 {</tt><tt><br>
      </tt><tt>        description "RIP protocol for IPv4";</tt><tt><br>
      </tt><tt><br>
      </tt><tt>        ipv4 {</tt><tt><br>
      </tt><tt>                table t_rip4;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>                export filter f_rip_export4;</tt><tt><br>
      </tt><tt>                import filter f_rip_import4;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>        };</tt><tt><br>
      </tt><tt><br>
      </tt><tt>        interface "eth0" {</tt><tt><br>
      </tt><tt>                update time 5;</tt><tt><br>
      </tt><tt>                metric 2;</tt><tt><br>
      </tt><tt>        };</tt><tt><br>
      </tt><tt>};</tt><br>
    </p>
    <p><br>
    </p>
    <p>Here is the result....  (sorry its in JSON)...<br>
    </p>
    <p><br>
    </p>
    <p>-------------------------------------------------------------------------------------
      RIP4(r1)
--------------------------------------------------------------------------------------<br>
      {}<br>
------------------------------------------------------------------------------------
      STATIC4(r1)
------------------------------------------------------------------------------------<br>
      {'192.168.20.0/24': [{'nexthops': [{'interface': 'eth1'}],<br>
                            'pref': '200',<br>
                            'prefix_type': 'unicast',<br>
                            'protocol': 'static4',<br>
                            'since': '2020-08-21 05:57:43',<br>
                            'type': ['static', 'univ']}]}<br>
------------------------------------------------------------------------------------
      MASTER4(r1)
------------------------------------------------------------------------------------<br>
      {'192.168.20.0/24': [{'nexthops': [{'interface': 'eth1'}],<br>
                            'pref': '200',<br>
                            'prefix_type': 'unicast',<br>
                            'protocol': 'static4',<br>
                            'since': '2020-08-21 05:57:43',<br>
                            'type': ['static', 'univ']}]}<br>
------------------------------------------------------------------------------------
      KERNEL4(r1)
------------------------------------------------------------------------------------<br>
      {'192.168.20.0/24': [{'nexthops': [{'interface': 'eth1'}],<br>
                            'pref': '200',<br>
                            'prefix_type': 'unicast',<br>
                            'protocol': 'static4',<br>
                            'since': '2020-08-21 05:57:43',<br>
                            'type': ['static', 'univ']}]}<br>
    </p>
    <p>And the full log...</p>
    <p>------------------------------------------------------------------------------------
      LOGFILE(r1)
------------------------------------------------------------------------------------<br>
      2020-08-21 05:57:43 <TRACE> device1: Initializing<br>
      2020-08-21 05:57:43 <TRACE> kernel4: Channel ipv4 connected
      to table t_kernel4<br>
      2020-08-21 05:57:43 <TRACE> kernel4: Initializing<br>
      2020-08-21 05:57:43 <TRACE> kernel6: Channel ipv6 connected
      to table t_kernel6<br>
      2020-08-21 05:57:43 <TRACE> kernel6: Initializing<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4: Channel
      pri connected to table master4<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4: Channel
      sec connected to table t_kernel4<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4:
      Initializing<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6: Channel
      pri connected to table master6<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6: Channel
      sec connected to table t_kernel6<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6:
      Initializing<br>
      2020-08-21 05:57:43 <TRACE> static4: Channel ipv4 connected
      to table t_static4<br>
      2020-08-21 05:57:43 <TRACE> static4: Initializing<br>
      2020-08-21 05:57:43 <TRACE> static6: Channel ipv6 connected
      to table t_static6<br>
      2020-08-21 05:57:43 <TRACE> static6: Initializing<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4: Channel
      pri connected to table t_static4<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4: Channel
      sec connected to table master4<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4:
      Initializing<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6: Channel
      pri connected to table t_static6<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6: Channel
      sec connected to table master6<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6:
      Initializing<br>
      2020-08-21 05:57:43 <TRACE> rip4: Channel ipv4 connected to
      table t_rip4<br>
      2020-08-21 05:57:43 <TRACE> rip4: Initializing<br>
      2020-08-21 05:57:43 <TRACE> rip6: Channel ipv6 connected to
      table t_rip6<br>
      2020-08-21 05:57:43 <TRACE> rip6: Initializing<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4: Channel pri
      connected to table t_rip4<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4: Channel sec
      connected to table master4<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4: Initializing<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6: Channel pri
      connected to table t_rip6<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6: Channel sec
      connected to table master6<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6: Initializing<br>
      2020-08-21 05:57:43 <TRACE> device1: Starting<br>
      2020-08-21 05:57:43 <TRACE> device1: Scanning interfaces<br>
      2020-08-21 05:57:43 <TRACE> device1: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> kernel4: Starting<br>
      2020-08-21 05:57:43 <TRACE> kernel4: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> kernel6: Starting<br>
      2020-08-21 05:57:43 <TRACE> kernel6: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4: Starting<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4: State
      changed to up<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6: Starting<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6: State
      changed to up<br>
      2020-08-21 05:57:43 <TRACE> static4: Starting<br>
      2020-08-21 05:57:43 <TRACE> static4: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> static4 > added [best]
      192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> static6: Starting<br>
      2020-08-21 05:57:43 <TRACE> static6: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> static6 > added [best]
      fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4: Starting<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4: State
      changed to up<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6: Starting<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6: State
      changed to up<br>
      2020-08-21 05:57:43 <TRACE> rip4: Starting<br>
      2020-08-21 05:57:43 <TRACE> rip4: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> rip6: Starting<br>
      2020-08-21 05:57:43 <TRACE> rip6: State changed to up<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4: Starting<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4: State changed
      to up<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6: Starting<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6: State changed
      to up<br>
      2020-08-21 05:57:43 <INFO> Started<br>
      2020-08-21 05:57:43 <TRACE> kernel4 < interface lo goes
      up<br>
      2020-08-21 05:57:43 <TRACE> kernel4 < interface eth0 goes
      up<br>
      2020-08-21 05:57:43 <TRACE> kernel4 < interface eth1 goes
      up<br>
      2020-08-21 05:57:43 <TRACE> kernel6 < interface lo goes
      up<br>
      2020-08-21 05:57:43 <TRACE> kernel6 < interface eth0 goes
      up<br>
      2020-08-21 05:57:43 <TRACE> kernel6 < interface eth1 goes
      up<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4 < added
      192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4 > added
      [best] 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4 < added
      192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4 > added
      [best] 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_master4_to_kernel4 <
      rejected by protocol 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> kernel4 < added
      192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4 <
      rejected by protocol 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <INFO> rip to master<br>
      2020-08-21 05:57:43 <INFO> (enum 30)1<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4 < filtered
      out 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static4_to_master4 <
      rejected by protocol 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6 < added
      fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6 > added
      [best] fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6 < added
      fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6 > added
      [best] fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_master6_to_kernel6 <
      rejected by protocol fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> kernel6 < added fc20::/64
      unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6 <
      rejected by protocol fc20::/64 unicast<br>
      2020-08-21 05:57:43 <INFO> rip to master<br>
      2020-08-21 05:57:43 <INFO> (enum 30)1<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6 < filtered
      out fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> p_static6_to_master6 <
      rejected by protocol fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> rip4 < interface lo goes up<br>
      2020-08-21 05:57:43 <TRACE> rip4 < interface eth0 goes up<br>
      2020-08-21 05:57:43 <TRACE> rip4: Adding interface eth0<br>
      2020-08-21 05:57:43 <TRACE> rip4 < interface eth1 goes up<br>
      2020-08-21 05:57:43 <TRACE> rip6 < interface lo goes up<br>
      2020-08-21 05:57:43 <TRACE> rip6 < interface eth0 goes up<br>
      2020-08-21 05:57:43 <TRACE> rip6: Adding interface eth0<br>
      2020-08-21 05:57:43 <TRACE> rip6 < interface eth1 goes up<br>
      2020-08-21 05:57:43 <INFO> rip to master<br>
      2020-08-21 05:57:43 <INFO> (enum 30)1<br>
      2020-08-21 05:57:43 <TRACE> p_rip4_to_master4 < filtered
      out 192.168.20.0/24 unicast<br>
      2020-08-21 05:57:43 <INFO> rip to master<br>
      2020-08-21 05:57:43 <INFO> (enum 30)1<br>
      2020-08-21 05:57:43 <TRACE> p_rip6_to_master6 < filtered
      out fc20::/64 unicast<br>
      2020-08-21 05:57:43 <TRACE> kernel4: Scanning routing table<br>
      2020-08-21 05:57:43 <TRACE> kernel4: Pruning table t_kernel4<br>
      2020-08-21 05:57:43 <TRACE> kernel4: Pruning inherited
      routes<br>
      2020-08-21 05:57:43 <TRACE> kernel6: Pruning table t_kernel6<br>
      2020-08-21 05:57:43 <TRACE> kernel6: Pruning inherited
      routes<br>
      2020-08-21 05:57:43 <TRACE> rip6: Starting interface eth0<br>
      2020-08-21 05:57:43 <TRACE> rip4: Starting interface eth0<br>
      2020-08-21 05:57:43 <TRACE> rip4: Interface timer fired for
      eth0<br>
      2020-08-21 05:57:43 <TRACE> rip4: Sending triggered updates
      for eth0<br>
      2020-08-21 05:57:43 <TRACE> rip6: Interface timer fired for
      eth0<br>
      2020-08-21 05:57:43 <TRACE> rip6: Sending triggered updates
      for eth0<br>
      2020-08-21 05:57:45 <TRACE> rip4: Interface timer fired for
      eth0<br>
      2020-08-21 05:57:45 <TRACE> rip4: Sending regular updates
      for eth0<br>
      2020-08-21 05:57:46 <TRACE> rip6: Interface timer fired for
      eth0<br>
      2020-08-21 05:57:46 <TRACE> rip6: Sending regular updates
      for eth0<br>
      2020-08-21 05:57:50 <TRACE> rip4: Interface timer fired for
      eth0<br>
      2020-08-21 05:57:50 <TRACE> rip4: Sending regular updates
      for eth0<br>
    </p>
    <p><br>
    </p>
  </body>
</html>