fixing default rules from cordfabric manager
Change-Id: Ic18b7b2e5af8409c70c25cadc9fe15074cc99986
Showing
1 changed file
with
1 additions
and
58 deletions
... | @@ -104,42 +104,14 @@ public class CordFabricManager implements FabricService { | ... | @@ -104,42 +104,14 @@ public class CordFabricManager implements FabricService { |
104 | private void setupDefaultFlows() { | 104 | private void setupDefaultFlows() { |
105 | TrafficSelector toControllerOF = DefaultTrafficSelector.builder() | 105 | TrafficSelector toControllerOF = DefaultTrafficSelector.builder() |
106 | .matchEthType(Ethernet.TYPE_IPV4) | 106 | .matchEthType(Ethernet.TYPE_IPV4) |
107 | - .matchIPProtocol(IPv4.PROTOCOL_TCP) | ||
108 | - .matchTcpDst(openflowPort) | ||
109 | - .build(); | ||
110 | - | ||
111 | - TrafficSelector fromControllerOF = DefaultTrafficSelector.builder() | ||
112 | - .matchEthType(Ethernet.TYPE_IPV4) | ||
113 | - .matchIPProtocol(IPv4.PROTOCOL_TCP) | ||
114 | - .matchTcpSrc(openflowPort) | ||
115 | - .build(); | ||
116 | - | ||
117 | - TrafficSelector toRadius = DefaultTrafficSelector.builder() | ||
118 | - .matchEthType(Ethernet.TYPE_IPV4) | ||
119 | - .matchInPort(oltConnectPoint.port()) | ||
120 | - .matchIPProtocol(IPv4.PROTOCOL_UDP) | ||
121 | - .matchUdpDst(radiusPort) | ||
122 | - .build(); | ||
123 | - | ||
124 | - TrafficSelector fromRadius = DefaultTrafficSelector.builder() | ||
125 | - .matchEthType(Ethernet.TYPE_IPV4) | ||
126 | - .matchInPort(radiusConnectPoint.port()) | ||
127 | .matchIPProtocol(IPv4.PROTOCOL_UDP) | 107 | .matchIPProtocol(IPv4.PROTOCOL_UDP) |
128 | .matchUdpDst(radiusPort) | 108 | .matchUdpDst(radiusPort) |
129 | .build(); | 109 | .build(); |
130 | 110 | ||
131 | - | ||
132 | TrafficTreatment forwardToController = DefaultTrafficTreatment.builder() | 111 | TrafficTreatment forwardToController = DefaultTrafficTreatment.builder() |
133 | - .setOutput(oltControllerConnectPoint.port()) | 112 | + .punt() |
134 | .build(); | 113 | .build(); |
135 | 114 | ||
136 | - TrafficTreatment forwardToOLT = DefaultTrafficTreatment.builder() | ||
137 | - .setOutput(oltConnectPoint.port()) | ||
138 | - .build(); | ||
139 | - | ||
140 | - TrafficTreatment forwardToRadius = DefaultTrafficTreatment.builder() | ||
141 | - .setOutput(radiusConnectPoint.port()) | ||
142 | - .build(); | ||
143 | 115 | ||
144 | 116 | ||
145 | ForwardingObjective ofToController = DefaultForwardingObjective.builder() | 117 | ForwardingObjective ofToController = DefaultForwardingObjective.builder() |
... | @@ -151,37 +123,8 @@ public class CordFabricManager implements FabricService { | ... | @@ -151,37 +123,8 @@ public class CordFabricManager implements FabricService { |
151 | .withTreatment(forwardToController) | 123 | .withTreatment(forwardToController) |
152 | .add(); | 124 | .add(); |
153 | 125 | ||
154 | - ForwardingObjective ofFromController = DefaultForwardingObjective.builder() | ||
155 | - .fromApp(appId) | ||
156 | - .makePermanent() | ||
157 | - .withFlag(ForwardingObjective.Flag.VERSATILE) | ||
158 | - .withPriority(PRIORITY) | ||
159 | - .withSelector(fromControllerOF) | ||
160 | - .withTreatment(forwardToOLT) | ||
161 | - .add(); | ||
162 | - | ||
163 | - ForwardingObjective gotoRadius = DefaultForwardingObjective.builder() | ||
164 | - .fromApp(appId) | ||
165 | - .makePermanent() | ||
166 | - .withFlag(ForwardingObjective.Flag.VERSATILE) | ||
167 | - .withPriority(PRIORITY) | ||
168 | - .withSelector(toRadius) | ||
169 | - .withTreatment(forwardToRadius) | ||
170 | - .add(); | ||
171 | - | ||
172 | - ForwardingObjective cameFromRadius = DefaultForwardingObjective.builder() | ||
173 | - .fromApp(appId) | ||
174 | - .makePermanent() | ||
175 | - .withFlag(ForwardingObjective.Flag.VERSATILE) | ||
176 | - .withPriority(PRIORITY) | ||
177 | - .withSelector(fromRadius) | ||
178 | - .withTreatment(forwardToOLT) | ||
179 | - .add(); | ||
180 | 126 | ||
181 | flowObjectiveService.forward(fabricDeviceId, ofToController); | 127 | flowObjectiveService.forward(fabricDeviceId, ofToController); |
182 | - flowObjectiveService.forward(fabricDeviceId, ofFromController); | ||
183 | - flowObjectiveService.forward(fabricDeviceId, gotoRadius); | ||
184 | - flowObjectiveService.forward(fabricDeviceId, cameFromRadius); | ||
185 | } | 128 | } |
186 | 129 | ||
187 | @Override | 130 | @Override | ... | ... |
-
Please register or login to post a comment