Projet

Général

Profil

« Précédent | Suivant » 

Révision 6da9a160

Ajouté par Ermal il y a plus de 9 ans

Display all new information on ipsec:status and also fix displaying of some previous statistics

Voir les différences:

usr/local/www/diag_ipsec.php
109 109
				<th class="listhdrr nowrap"><?php echo gettext("Remote IP");?></th>
110 110
				<th class="listhdrr nowrap"><?php echo gettext("Role");?></th>
111 111
				<th class="listhdrr nowrap"><?php echo gettext("Reauth");?></th>
112
				<th class="listhdrr nowrap"><?php echo gettext("Algo");?></th>
112 113
				<th class="listhdrr nowrap"><?php echo gettext("Status");?></th>
113 114
				<td class="list nowrap"></td>
114 115
		</tr>
......
152 153
					echo "Unknown";
153 154
				else {
154 155
					if (!empty($ikesa['local']['address']))
155
						echo htmlspecialchars($ikesa['local']['address']) . ':' . htmlspecialchars($ikesa['local']['port']);
156
						echo htmlspecialchars($ikesa['local']['address']) . '<br/>Port:' . htmlspecialchars($ikesa['local']['port']);
156 157
					else
157 158
						echo 'Unknown';
158 159
					if ($ikesa['local']['nat'] != 'false')
......
164 165
			<?php   if (!is_array($ikesa['remote']))
165 166
					echo "Unknown";
166 167
				else {
168
					$identity = "";
167 169
					if (!empty($ikesa['remote']['identification'])) {
168 170
						if ($ikesa['remote']['identification'] == '%any')
169
							echo 'Any identifier';
171
							$identity = 'Any identifier';
170 172
						else
171
							echo htmlspecialchars($ikesa['remote']['identification']);
172
					} else
173
						echo 'Unknown';
173
							$identity = htmlspecialchars($ikesa['remote']['identification']);
174
					}
174 175

  
175
					if (is_array($ikesa['remote']['auth']) && !empty($ikesa['remote']['auth']['identity'])) {
176
						echo "<br/> {$ikesa['remote']['auth']['identity']}";
176
					if (is_array($ikesa['remote']['auth']) && !empty($ikesa['remote']['auth'][0]['identity'])) {
177
						echo htmlspecialchars($ikesa['remote']['auth'][0]['identity']);
178
						echo "<br/>{$identity}";
179
					} else {
180
						if (empty($identity))
181
							echo "Unknown";
182
						else
183
							echo $identity;
177 184
					}
178 185
				}
179 186
			?>
......
183 190
					echo "Unknown";
184 191
				else {
185 192
					if (!empty($ikesa['remote']['address']))
186
						echo htmlspecialchars($ikesa['remote']['address']) . ':' . htmlspecialchars($ikesa['remote']['port']);
193
						echo htmlspecialchars($ikesa['remote']['address']) . '<br/>Port:' . htmlspecialchars($ikesa['remote']['port']);
187 194
					else
188 195
						echo 'Unknown';
189 196
					if ($ikesa['remote']['nat'] != 'false')
......
192 199
			?>
193 200
				</td>
194 201
				<td class="listr">
202
					IKEv<?php echo htmlspecialchars($ikesa['version']);?>
203
					<br/>
195 204
					<?php echo htmlspecialchars($ikesa['role']);?>
205
					
196 206
				</td>
197 207
				<td class="listr">
198 208
					<?php echo htmlspecialchars($ikesa['reauth']);?>
199 209
				</td>
210
				<td class="listr">
211
					<?php
212
						echo htmlspecialchars($ikesa['encalg']);
213
						echo "<br/>";
214
						echo htmlspecialchars($ikesa['intalg']);
215
						echo "<br/>";
216
						echo htmlspecialchars($ikesa['prfalg']);
217
						echo "<br/>";
218
						echo htmlspecialchars($ikesa['dhgroup']);
219
					?>
220
				</td>
200 221
				<td class="listr">
201 222
					<center>
202 223
						<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_<?php echo $icon; ?>.gif" title="<?php echo $ikesa['status']; ?>" alt=""/>
203 224
						<br/><?php echo htmlspecialchars($ikesa['status']);?>
225
						<br/><?php echo htmlspecialchars($ikesa['established']);?>
204 226
					</center>
205 227
				</td>
206 228
				<td >
......
228 250
			</tr>
229 251
			<?php if (is_array($ikesa['childsalist'])): ?>
230 252
			<tr>
231
				<td class="listrborder" colspan="8">
253
				<td class="listrborder" colspan="9">
232 254
				<div id="btnchildsa-<?=$ikeid;?>">
233 255
					<input  type="button" onclick="show_childsa('childsa-<?=$ikeid;?>','btnchildsa-<?=$ikeid;?>');" value="+" /> - Show child SA entries
234 256
				</div>
......
236 258
				<thead>
237 259
					<tr>
238 260
						<th class="listhdrr nowrap"><?php echo gettext("Local subnets");?></th>
239
						<th class="listhdrr nowrap"><?php echo gettext("Local SPI");?></th>
240
						<th class="listhdrr nowrap"><?php echo gettext("Remote SPI");?></th>
261
						<th class="listhdrr nowrap"><?php echo gettext("Local SPI(s)");?></th>
241 262
						<th class="listhdrr nowrap"><?php echo gettext("Remote subnets");?></th>
242
						<th class="listhdrr nowrap"><?php echo gettext("Rekey");?></th>
263
						<th class="listhdrr nowrap"><?php echo gettext("Times");?></th>
243 264
						<th class="listhdrr nowrap"><?php echo gettext("Algo");?></th>
244 265
						<th class="listhdrr nowrap"><?php echo gettext("Stats");?></th>
245 266
					</tr>
......
261 282
						</td>
262 283
						<td class="listr nowrap">
263 284
				<?php	if (is_array($childsa['local']))
264
						echo htmlspecialchars($childsa['local']['spi']);
285
						echo "Local: " . htmlspecialchars($childsa['local']['spi']);
265 286
				?>
266
						</td>
267
						<td class="listr nowrap">
268 287
				<?php	if (is_array($childsa['remote']))
269
						echo htmlspecialchars($childsa['remote']['spi']);
288
						echo "<br/>Remote: " . htmlspecialchars($childsa['remote']['spi']);
270 289
				?>
271 290
						</td>
272 291
						<td class="listr nowrap">
......
279 298
				?>
280 299
						</td>
281 300
						<td class="listr nowrap">
282
							<?php echo htmlspecialchars($childsa['rekey']); ?>
301
							<?php
302
								echo "Rekey: " . htmlspecialchars($childsa['rekey']);
303
								echo "<br/>Life: " . htmlspecialchars($childsa['lifetime']);
304
								echo "<br/>Install: " .htmlspecialchars($childsa['installtime']);
305

  
306
							?>
283 307
						</td>
284 308
						<td class="listr nowrap">
285 309
						<?php
......
287 311
							echo "<br/>";
288 312
							echo htmlspecialchars($childsa['intalg']);
289 313
							echo "<br/>";
290
							if (!empty($childsa['esn']))
291
								echo htmlspecialchars($childsa['rekey']);
314
							if (!empty($childsa['prfalg'])) {
315
								echo htmlspecialchars($childsa['prfalg']);
316
								echo "<br/>";
317
							}
318
							if (!empty($childsa['dhgroup'])) {
319
								echo htmlspecialchars($childsa['dhgroup']);
320
								echo "<br/>";
321
							}
322
							if (!empty($childsa['esn'])) {
323
								echo htmlspecialchars($childsa['esn']);
324
								echo "<br/>";
325
							}
326
							echo "IPComp: " . htmlspecialchars($childsa['ipcomp']);
292 327
						?>
293 328
						</td>
294 329
						<td class="listr nowrap">
295 330
						<?php
296
							echo "IPComp: " . htmlspecialchars($childsa['ipcomp']);
297
							echo "<br/>";
298
							echo "Bytes-In: " . htmlspecialchars($childsa['bytesin']) . "/Packets-In: " . htmlspecialchars($childsa['packetsin']);;
331
							echo "Bytes-In: " . htmlspecialchars($childsa['bytesin']) . "<br/>Packets-In: " . htmlspecialchars($childsa['packetsin']);;
299 332
							echo "<br/>";
300
							echo "Bytes-Out: " . htmlspecialchars($childsa['bytesout']) . "/Packets-Out: " . htmlspecialchars($childsa['packetsout']);;
333
							echo "Bytes-Out: " . htmlspecialchars($childsa['bytesout']) . "<br/>Packets-Out: " . htmlspecialchars($childsa['packetsout']);;
301 334
						?>
302 335
						</td>
303
						<td class="listr nowrap">
336
						<td>
304 337
							<center>
305 338
								<a href="diag_ipsec.php?act=childdisconnect&amp;ikeid=<?php echo $con_id; ?>&amp;ikesaid=<?php echo $childsa['reqid']; ?>">
306 339
								<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" alt="Disconnect Child SA" title="Disconnect Child SA" border="0"/>
......
369 402
				echo htmlspecialchars($ph1src);
370 403
		?>
371 404
			</td>
372
			<td class="listr">
405
			<td class="listr" >
406
			</td>
407
			<td class="listr" >
408
			</td>
409
			<td class="listr" >
373 410
			</td>
374 411
			<td class="listr">
375 412
				<center>

Formats disponibles : Unified diff