ovs-monitor-ipsec: Use "require" when adding SPD entries.
authorJustin Pettit <jpettit@nicira.com>
Tue, 18 Jan 2011 08:01:24 +0000 (00:01 -0800)
committerJustin Pettit <jpettit@nicira.com>
Thu, 20 Jan 2011 01:52:12 +0000 (17:52 -0800)
Previously, SPD entries were added with a level of "default".  This uses
the system-wide default for the protocol when processing a matching
packet.  Switch the level to "require" so that a SA is always used when
sending the packet.

debian/ovs-monitor-ipsec

index 07ad398..12ff9f5 100755 (executable)
@@ -317,9 +317,9 @@ class IPsec:
         self.call_setkey("spdflush;")
 
     def spd_add(self, local_ip, remote_ip):
-        cmds = ("spdadd %s %s gre -P out ipsec esp/transport//default;\n" %
+        cmds = ("spdadd %s %s gre -P out ipsec esp/transport//require;\n" %
                     (local_ip, remote_ip))
-        cmds += ("spdadd %s %s gre -P in ipsec esp/transport//default;" %
+        cmds += ("spdadd %s %s gre -P in ipsec esp/transport//require;" %
                     (remote_ip, local_ip))
         self.call_setkey(cmds)