Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
fe230cac
Commit
fe230cac
authored
11 years ago
by
Jo-Philipp Wich
Browse files
Options
Downloads
Patches
Plain Diff
base-files: add network_get_protocol() to /lib/functions/network.sh
SVN-Revision: 39099
parent
5d79ad06
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/base-files/files/lib/functions/network.sh
+7
-2
7 additions, 2 deletions
package/base-files/files/lib/functions/network.sh
with
7 additions
and
2 deletions
package/base-files/files/lib/functions/network.sh
+
7
−
2
View file @
fe230cac
...
@@ -174,8 +174,8 @@ __network_parse_ifstatus()
...
@@ -174,8 +174,8 @@ __network_parse_ifstatus()
fi
fi
done
done
# parse up state, device and physdev
# parse up state,
proto,
device and physdev
for
__field
in
"up"
"l3_device"
"device"
;
do
for
__field
in
"up"
"proto"
"l3_device"
"device"
;
do
if
json_get_type __tmp
"
$__field
"
;
then
if
json_get_type __tmp
"
$__field
"
;
then
__network_set_cache
"
${
__key
}
_
${
__field
}
"
"
$__field
"
__network_set_cache
"
${
__key
}
_
${
__field
}
"
"
$__field
"
fi
fi
...
@@ -381,6 +381,11 @@ network_is_up()
...
@@ -381,6 +381,11 @@ network_is_up()
__network_device __up
"
$1
"
up
&&
[
$__up
-eq
1
]
__network_device __up
"
$1
"
up
&&
[
$__up
-eq
1
]
}
}
# determine the protocol of the given logical interface
# 1: destination variable
# 2: interface
network_get_protocol
()
{
__network_device
"
$1
"
"
$2
"
proto
;
}
# determine the layer 3 linux network device of the given logical interface
# determine the layer 3 linux network device of the given logical interface
# 1: destination variable
# 1: destination variable
# 2: interface
# 2: interface
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment