Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
416b3b5a
Commit
416b3b5a
authored
Jul 08, 2015
by
José Luis Gutiérrez
Committed by
Alessandro Rubini
Jul 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www: network and gateway fields added for static IP
parent
838f687a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
network.php
userspace/rootfs_override/var/www/network.php
+20
-5
No files found.
userspace/rootfs_override/var/www/network.php
View file @
416b3b5a
...
...
@@ -110,6 +110,14 @@
<td>Broadcast: </td>
<td><INPUT type="text" value="192.168.1.255" name="broadcast" ></td>
</tr>
<tr>
<td>Network: </td>
<td><INPUT type="text" value="192.168.1.0" name="network" ></td>
</tr>
<tr>
<td>Gateway: </td>
<td><INPUT type="text" value="192.168.1.1" name="gateway" ></td>
</tr>
</table>
<INPUT type="submit" value="Save New Configuration" class="btn last">
<INPUT type="hidden" value="DHCPONCE" name="dhcp">
...
...
@@ -133,6 +141,14 @@
<td>Broadcast: </td>
<td><INPUT type="text" value="192.168.1.255" name="broadcast" ></td>
</tr>
<tr>
<td>Network: </td>
<td><INPUT type="text" value="192.168.1.0" name="network" ></td>
</tr>
<tr>
<td>Gateway: </td>
<td><INPUT type="text" value="192.168.1.1" name="gateway" ></td>
</tr>
</table>
<INPUT type="submit" value="Save New Configuration" class="btn last">
</FORM>'
;
...
...
@@ -141,15 +157,14 @@
if
((
!
empty
(
$_POST
[
"ip"
]))
&&
(
!
empty
(
$_POST
[
"netmask"
]))
&&
(
!
empty
(
$_POST
[
"broadcast"
]))){
if
(
!
empty
(
$_POST
[
"dhcp"
])){
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_DHCP_ONCE"
]
=
"y"
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_IP"
]
=
$_POST
[
"ip"
];
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_MASK"
]
=
$_POST
[
"netmask"
];
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_NETWORK"
]
=
""
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_NETWORK"
]
=
$_POST
[
"network"
]
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_BROADCAST"
]
=
$_POST
[
"broadcast"
];
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_GATEWAY"
]
=
""
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_GATEWAY"
]
=
$_POST
[
"gateway"
]
;
check_add_existing_kconfig
(
"CONFIG_ETH0_DHCP_ONCE="
);
check_add_existing_kconfig
(
"CONFIG_ETH0_IP="
);
...
...
@@ -168,9 +183,9 @@
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_IP"
]
=
$_POST
[
"ip"
];
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_MASK"
]
=
$_POST
[
"netmask"
];
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_NETWORK"
]
=
""
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_NETWORK"
]
=
$_POST
[
"network"
]
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_BROADCAST"
]
=
$_POST
[
"broadcast"
];
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_GATEWAY"
]
=
""
;
$_SESSION
[
"KCONFIG"
][
"CONFIG_ETH0_GATEWAY"
]
=
$_POST
[
"gateway"
]
;
check_add_existing_kconfig
(
"CONFIG_ETH0_STATIC="
);
check_add_existing_kconfig
(
"CONFIG_ETH0_IP="
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment