example/router: Fix set_field parameter
This commit is contained in:
parent
1f5d3cbab2
commit
1540ddf34c
3 changed files with 7 additions and 7 deletions
|
|
@ -61,7 +61,7 @@ defmodule SimpleRouter.Openflow.FlowTables do
|
||||||
ipv4_dst: {route.dst, route.mask}
|
ipv4_dst: {route.dst, route.mask}
|
||||||
),
|
),
|
||||||
instructions: [
|
instructions: [
|
||||||
ApplyActions.new(SetField.new({:reg0, IPv4Address.to_int(route.nexthop)})),
|
ApplyActions.new(SetField.new(reg0: IPv4Address.to_int(route.nexthop))),
|
||||||
GotoTable.new(@interface_lookup_table_id)
|
GotoTable.new(@interface_lookup_table_id)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
@ -103,7 +103,7 @@ defmodule SimpleRouter.Openflow.FlowTables do
|
||||||
match: match,
|
match: match,
|
||||||
instructions: [
|
instructions: [
|
||||||
ApplyActions.new([
|
ApplyActions.new([
|
||||||
SetField.new({:reg1, iface.number}),
|
SetField.new(reg1: iface.number),
|
||||||
NxResubmitTable.new(@arp_lookup_table_id),
|
NxResubmitTable.new(@arp_lookup_table_id),
|
||||||
NxResubmitTable.new(@egress_table_id)
|
NxResubmitTable.new(@egress_table_id)
|
||||||
])
|
])
|
||||||
|
|
@ -174,9 +174,9 @@ defmodule SimpleRouter.Openflow.FlowTables do
|
||||||
NxStackPop.new(field: :arp_tpa),
|
NxStackPop.new(field: :arp_tpa),
|
||||||
NxStackPop.new(field: :arp_tha),
|
NxStackPop.new(field: :arp_tha),
|
||||||
NxStackPop.new(field: :arp_spa),
|
NxStackPop.new(field: :arp_spa),
|
||||||
SetField.new({:arp_op, 0x2}),
|
SetField.new(arp_op: 0x2),
|
||||||
SetField.new({:arp_sha, mac}),
|
SetField.new(arp_sha: mac),
|
||||||
SetField.new({:eth_src, mac}),
|
SetField.new(eth_src: mac),
|
||||||
Output.new(:in_port)
|
Output.new(:in_port)
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ defmodule SimpleRouter.Openflow.GroupTables do
|
||||||
bucket =
|
bucket =
|
||||||
Openflow.Bucket.new(
|
Openflow.Bucket.new(
|
||||||
actions: [
|
actions: [
|
||||||
SetField.new({:eth_src, iface.mac_address}),
|
SetField.new(eth_src: iface.mac_address),
|
||||||
Output.new(iface.number)
|
Output.new(iface.number)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@
|
||||||
"eovsdb": {:git, "https://github.com/shun159/eovsdb.git", "1ff1572708d72fd25631c681f2102407903252a3", [branch: "master"]},
|
"eovsdb": {:git, "https://github.com/shun159/eovsdb.git", "1ff1572708d72fd25631c681f2102407903252a3", [branch: "master"]},
|
||||||
"jsone": {:git, "https://github.com/sile/jsone.git", "b23d312a5ed051ea7ad0989a9f2cb1a9c3f9a502", [tag: "1.4.6"]},
|
"jsone": {:git, "https://github.com/sile/jsone.git", "b23d312a5ed051ea7ad0989a9f2cb1a9c3f9a502", [tag: "1.4.6"]},
|
||||||
"pkt": {:git, "https://github.com/msantos/pkt.git", "ff0e9a7d28cdae941bce935602cd252cad1ea296", []},
|
"pkt": {:git, "https://github.com/msantos/pkt.git", "ff0e9a7d28cdae941bce935602cd252cad1ea296", []},
|
||||||
"ranch": {:hex, :ranch, "1.6.2", "6db93c78f411ee033dbb18ba8234c5574883acb9a75af0fb90a9b82ea46afa00", [:rebar3], [], "hexpm"},
|
"ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm"},
|
||||||
"uuid": {:git, "https://github.com/avtobiff/erlang-uuid.git", "585c2474afb4a597ae8c8bf6d21e5a9c73f18e0b", [tag: "v0.5.0"]},
|
"uuid": {:git, "https://github.com/avtobiff/erlang-uuid.git", "585c2474afb4a597ae8c8bf6d21e5a9c73f18e0b", [tag: "v0.5.0"]},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue