File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,16 @@ class RoutingGatewayGroup extends Model {
6868 protected function from_internal_ipprotocol (): string {
6969 # Check the IP protocol of the gateways in this group
7070 foreach ($ this ->priorities ->value as $ priority ) {
71- $ gw_obj = RoutingGateway::query (name: $ priority ['gateway ' ])->first ();
71+ # Query for the gateway related to this priority
72+ $ gw_q = RoutingGateway::query (name: $ priority ['gateway ' ]);
73+
74+ # Skip this priority if the gateway does not exist. This can happen if the gateway is not in config.
75+ if (!$ gw_q ->exists ()) {
76+ continue ;
77+ }
78+
79+ # Check the IP protocol of the gateway
80+ $ gw_obj = $ gw_q ->first ();
7281 if ($ gw_obj ->ipprotocol ->value === 'inet ' ) {
7382 return 'inet ' ;
7483 } elseif ($ gw_obj ->ipprotocol ->value === 'inet6 ' ) {
You can’t perform that action at this time.
0 commit comments